Memory move instruction sequence including a stream of copy-type and paste-type instructions

ABSTRACT

A processor core has a store-through upper level cache and a store-in lower level cache. In response to execution of a memory move instruction sequence including a plurality of copy-type instruction and a plurality of paste-type instructions, the processor core transmits a corresponding plurality of copy-type and paste-type requests to the lower level cache, where each copy-type request specifies a source real address and each paste-type request specifies a destination real address. In response to receipt of each copy-type request, the lower level cache copies a respective one of a plurality of data granules from a respective storage location specified by the source real address of that copy-type request into a non-architected buffer. In response to receipt of each paste-type request, the lower level cache writes a respective one of the plurality of data granules from the non-architected buffer to a respective storage location specified by the destination real address of that paste-type request.

BACKGROUND OF THE INVENTION

The present invention relates generally to data processing and, inparticular, to accessing memory of a data processing system utilizingcopy and paste instructions.

A conventional multiprocessor (MP) computer system comprises multipleprocessing units (which can each include one or more processor cores andtheir various register sets and cache memories), input/output (I/O)devices, and data storage, which can include both system memory(volatile and/or nonvolatile) and nonvolatile mass storage. In order toprovide enough addresses for memory-mapped I/O operations and the dataand instructions utilized by operating system and application software,MP computer systems typically reference an effective address space thatincludes a much larger number of effective addresses than the number ofphysical storage locations in the memory-mapped I/O devices and systemmemory. Therefore, to perform memory-mapped I/O or to access systemmemory, a processor core within a computer system that utilizeseffective addressing is required to translate an effective address intoa real address assigned to a particular I/O device or a physical storagelocation within system memory.

In general, an MP computer system can be classified as implementingeither a Complex Instruction Set Computer (CISC) or Reduced InstructionSet Computer (RISC) architecture. CISC architectures are characterizedby the execution of so-called “complex instructions” that directlyreference the computer system's system memory and do not requireexplicit enumeration of any loads of operands from, or stores ofexecution results to, system memory. In contrast, RISC architectures arecharacterized by relatively simple instruction sets including load-typeand store-type memory access instructions that, when executed,explicitly direct the movement of data between system memory and thearchitected register set(s) of the processor (i.e., those registers thatcan be directly identified in an instruction as the source ordestination of data referenced by execution of the instruction).

BRIEF SUMMARY

The present disclosure appreciates that any commercially realizable RISCprocessor core will include one or more register files (sets) of finitedepth and thus include a limited number of architected registers. Thesearchitected registers represent a scarce resource, which if managedefficiently support greater throughput and thus improved processorperformance, and which if managed inefficiently can lead to lowerthroughput and thus decreased processor performance.

Memory moves (i.e., operations that move a data set from one region ofmemory to another) are one type of operation that place particularpressure on the availability of architected registers. In a conventionalmemory move in a data processing system implementing a RISCarchitecture, a load-type of instruction is first executed to allocatean architected register and then place contents of a first system memorylocation in the allocated register. A store-type instruction issubsequently executed to store the contents of the architected registerpreviously allocated by the load-type instruction to a second systemmemory location. As such load-store instruction pairs are repeated tomove the data set, each of the architected registers allocated to thememory move is allocated for an interval lasting at least for theduration of the two memory accesses and thus made unavailable for use byother instructions during this interval. The present disclosureappreciates that the pressure placed on the scarce architected registerresources of the processor core by a memory move can be alleviatedthrough implementation of copy and paste functionality as describedfurther herein.

In at least one embodiment, a processor core has a store-through upperlevel cache and a store-in lower level cache. In response to executionof a memory move instruction sequence including a plurality of copy-typeinstruction and a plurality of paste-type instructions, the processorcore transmits a corresponding plurality of copy-type and paste-typerequests to the lower level cache, where each copy-type requestspecifies a source real address and each paste-type request specifies adestination real address. In response to receipt of each copy-typerequest, the lower level cache copies a respective one of a plurality ofdata granules from a respective storage location specified by the sourcereal address of that copy-type request into a non-architected buffer. Inresponse to receipt of each paste-type request, the lower level cachewrites a respective one of the plurality of data granules from thenon-architected buffer to a respective storage location specified by thedestination real address of that paste-type request.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a high-level block diagram of an exemplary data processingsystem in accordance with one embodiment;

FIG. 2 is a more detailed block diagram of an exemplary processing unitin accordance with one embodiment;

FIG. 3 is a detailed block diagram of a lower level store-in cachememory in accordance with one embodiment;

FIG. 4A illustrates a copy_first instruction in accordance with oneembodiment;

FIG. 4B depicts a paste_last instruction in accordance with oneembodiment;

FIG. 4C illustrates a cp_abort instruction in accordance with oneembodiment;

FIG. 5A is an exemplary memory move instruction sequence includingcopy_first and paste_last instructions in accordance with oneembodiment;

FIG. 5B is an exemplary illegal instruction sequence including apaste_last instruction not preceded by a copy_first instruction;

FIG. 5C is an exemplary illegal instruction sequence including multiplecopy_first instructions followed by a paste_last instruction;

FIG. 5D is an exemplary instruction sequence including a context switchbetween execution of a copy_first instruction and a paste_lastinstruction;

FIG. 5E is an exemplary instruction sequence including a context switchduring execution of a memory move;

FIG. 6 is a more detailed block diagram of a copy-paste dispatch (CPD)unit in accordance with one embodiment;

FIG. 7 is a high level logical flowchart of an exemplary method by whicha processing unit handles memory access requests initiated by executionof memory move instructions in accordance with the embodiment of FIG. 6;

FIG. 8 is a more detailed block diagram of a copy-paste dispatch unitand processor core in accordance with another embodiment;

FIG. 9 is a high level logical flowchart of an exemplary method by whicha processor core handles memory access requests initiated by executionof memory move instructions in accordance with the embodiment of FIG. 8;

FIG. 10 is a high level logical flowchart of an exemplary method bywhich a store-in lower level cache memory handles memory access requestsinitiated by execution of memory move instructions in accordance withthe embodiment of FIG. 8;

FIG. 11 is a high level block diagram of a copy-paste engine (CPE) inaccordance with one embodiment;

FIG. 12A illustrates a copy instruction in accordance with oneembodiment;

FIG. 12B depicts a paste instruction in accordance with one embodiment;

FIG. 13A is an exemplary memory move instruction sequence including astream of multiple copy and paste instructions in accordance with oneembodiment;

FIG. 13B is an exemplary illegal instruction sequence including a pasteinstruction not preceded by a copy_first or copy instruction;

FIG. 13C is an exemplary illegal instruction sequence including a copyinstruction not followed by a paste instruction;

FIG. 13D is an exemplary illegal instruction sequence including acopy_first instruction followed by a copy instruction;

FIG. 13E is an exemplary illegal instruction sequence omitting apaste_last instruction;

FIG. 13F is an exemplary instruction sequence including a context switchduring execution of a memory move;

FIGS. 14A-14B together form a high level logical flowchart of anexemplary method by which memory access requests initiated by executionof memory move instructions are serviced in accordance with anembodiment supporting copy-paste instruction streams;

FIGS. 15A-15B together form a high level logical flowchart of anexemplary method by which a processor core handles memory accessrequests initiated by execution of memory move instructions inaccordance with another embodiment supporting copy-paste instructionstreams;

FIG. 16 is a high level logical flowchart of an exemplary method bywhich a store-in lower level cache memory handles memory access requestsinitiated by execution of memory move instructions in accordance with anembodiment supporting copy-paste instruction streams;

FIG. 17 illustrates a copy_pending instruction in accordance with oneembodiment;

FIG. 18 depicts a saved register area (SRA) in memory in accordance withone embodiment;

FIG. 19 is a high level logical flowchart of an exemplary method bywhich a memory move is suspended in accordance with one embodiment;

FIG. 20 is a high level logical flowchart of an exemplary method bywhich a memory move is resumed in accordance with one embodiment;

FIG. 21 is a high level logical flowchart of an exemplary method bywhich a lower level cache memory services memory access requests inaccordance with one embodiment;

FIG. 22 is a high level logical flowchart of an exemplary method bywhich software handles a device busy condition in accordance with oneembodiment;

FIG. 23 illustrates an exemplary embodiment of a memory-mapped device inaccordance with one embodiment;

FIG. 24 is a high level logical flowchart of an exemplary method bywhich a memory-mapped device processes memory move requests received onthe interconnect fabric of a data processing system in accordance withone embodiment;

FIG. 25 is a high level logical flowchart of an exemplary method bywhich a memory-mapped device that is an accelerator switchboard (AS)queues data in accordance with one embodiment;

FIG. 26 depicts an exemplary queue in system memory in accordance withone embodiment;

FIG. 27 is a high level logical flowchart of an exemplary method bywhich a device ingests data queued by an AS in accordance with oneembodiment;

FIG. 28 is a high level logical flowchart of an exemplary method bywhich a barrier instruction, such as a heavyweight sync (HWSYNC), isprocessed in a processor core in accordance with one embodiment;

FIG. 29 is a high level logical flowchart of an exemplary method bywhich a barrier request, such as a heavyweight sync (HWSYNC), isprocessed in a store queue of a lower level cache memory in accordancewith one embodiment;

FIG. 30 is a high level logical flowchart of an exemplary method bywhich a barrier instruction, such as a lightweight sync (LWSYNC), isprocessed in a processor core in accordance with one embodiment;

FIG. 31 is a high level logical flowchart of an exemplary method bywhich a barrier request, such as a lightweight sync (LWSYNC), isprocessed in a store queue of a lower level cache memory in accordancewith one embodiment; and

FIG. 32 is a data flow diagram illustrating a design process.

DETAILED DESCRIPTION

With reference now to the figures, wherein like reference numerals referto like and corresponding parts throughout, and in particular withreference to FIG. 1, there is illustrated a high level block diagramdepicting an exemplary data processing system 100 in accordance with oneembodiment. In the depicted embodiment, data processing system 100 is acache coherent symmetric multiprocessor (SMP) data processing systemincluding multiple processing nodes 102 for processing data andinstructions. Processing nodes 102 are coupled to a system interconnect110 for conveying address, data and control information. Systeminterconnect 110 may be implemented, for example, as a busedinterconnect, a switched interconnect or a hybrid interconnect.

In the depicted embodiment, each processing node 102 is realized as amulti-chip module (MCM) containing four processing units 104 a-104 d,each preferably realized as a respective integrated circuit. Theprocessing units 104 within each processing node 102 are coupled forcommunication to each other and system interconnect 110 by a localinterconnect 114, which, like system interconnect 110, may beimplemented, for example, with one or more buses and/or switches. Systeminterconnect 110 and local interconnects 114 together form aninterconnect fabric.

As described below in greater detail with reference to FIG. 2,processing units 104 each include a memory controller 106 coupled tolocal interconnect 114 to provide an interface to a respective systemmemory 108. Data and instructions residing in system memories 108 cangenerally be accessed, cached and modified by a processor core in anyprocessing unit 104 of any processing node 102 within data processingsystem 100. System memories 108 thus form the lowest level of memorystorage in the distributed shared memory system of data processingsystem 100. In alternative embodiments, one or more memory controllers106 (and system memories 108) can be coupled to system interconnect 110rather than a local interconnect 114.

Those skilled in the art will appreciate that SMP data processing system100 of FIG. 1 can include many additional non-illustrated components,such as interconnect bridges, non-volatile storage, ports for connectionto networks or attached devices, etc. Because such additional componentsare not necessary for an understanding of the described embodiments,they are not illustrated in FIG. 1 or discussed further herein. Itshould also be understood, however, that the enhancements describedherein are applicable to data processing systems of diversearchitectures and are in no way limited to the generalized dataprocessing system architecture illustrated in FIG. 1.

Referring now to FIG. 2, there is depicted a more detailed block diagramof an exemplary processing unit 104 in accordance with one embodiment.In the illustrated embodiment, processing unit 104 is an individualintegrated circuit chip including one or more processor cores 200 forprocessing instructions and data. Processing unit 104 further includesan integrated and distributed fabric controller 216 responsible forcontrolling the flow of operations on the system fabric comprising localinterconnect 114 and system interconnect 110 and for implementing thecoherency communication required to implement the selected cachecoherency protocol. Processing unit 104 may further include anintegrated I/O (input/output) controller 214 supporting the attachmentof one or more I/O devices (not depicted). As discussed further below,processing unit 104 may also optionally include one or more additionalmemory-mapped devices, such as an accelerator switchboard (AS) 218and/or device(s) 220 coupled to local interconnect 114.

In a preferred embodiment, each processor core 200 of processing unit104 supports simultaneous multithreading (SMT) and thus is capable ofindependently executing multiple hardware threads of executionsimultaneously. In the given example, each processor core 200 includesan instruction sequencing unit (ISU) 202 that fetches instructions forexecution by that processor core 200 and orders the execution of theinstructions. Processor core 200 further includes one or more executionunits 206 a-206 k for executing instructions from the multiplesimultaneous hardware threads of execution. The instructions caninclude, for example, fixed-point and floating-point arithmeticinstructions, logical instructions, memory access instructions (e.g.,load-type and store-type instructions), memory synchronizationinstructions, etc. In general, execution units 206 a-206 k can executeinstructions of each hardware thread in any order as long as datadependencies and hazards and explicit orderings mandated by memorysynchronization instructions are observed. In the depicted embodiment,execution units 206 a-206 k include a load-store unit (LSU) 206 a, whichexecutes memory access instructions that request access to a memoryblock in the distributed shared memory system or cause the generation ofa request for access to a memory block in the distributed shared memorysystem. Data obtained from the distributed shared memory system bymemory accesses or generated by instruction execution are buffered inone or more register files (RFs) 208, each of which can include both anarchitecturally defined number of architected registers and a pool ofrename registers. Data are written, in response to execution of memoryaccess instructions by LSU 206 a, from the one or more register files208 to the distributed shared memory system.

Processor core 200 additionally includes a memory management unit (MMU)210 responsible for translating target effective addresses determined bythe execution of memory access instructions in execution units 206 a-206k into real addresses. MMU 210 performs effective-to-real addresstranslation by reference to one or more translation structure, such as atranslation lookaside buffer (TLB), block address table (BAT), segmentlookaside buffers (SLBs), etc. The number and type of these translationstructures varies between implementations and architectures.

Processor core 200 also includes a condition register 204 including aplurality of fields whose contents indicate various conditions. In theillustrated embodiment, two of these fields, E (equal) bit 205 and G(greater than) bit 207, are utilized, among other uses such asindicating the outcome of arithmetic computations, to indicateconditions related to memory accesses, as discussed further below. Useof these arithmetic condition register bits advantageously enablesconditional branch instructions that depend on arithmetic conditions(e.g., branch-greater-than and branch-equal-to instructions) to beutilized in conjunction with memory move instruction sequences. Ofcourse, in other embodiments, other fields of condition register 204 canalternatively be employed.

The operation of each processor core 200 is supported by a multi-levelmemory hierarchy having at its lowest level a shared system memory 108accessed via an integrated memory controller 106. At its upper levels,the multi-level memory hierarchy includes one or more levels of cachememory, which in the illustrative embodiment include a store-throughlevel one (L1) cache 212 within and private to each processor core 200and a respective store-in level two (L2) cache 230 for each processorcore 200. Although the illustrated cache hierarchies includes only twolevels of cache, those skilled in the art will appreciate thatalternative embodiments may include additional levels (L3, L4, etc.) ofon-chip or off-chip, private or shared, in-line or lookaside cache,which may be fully inclusive, partially inclusive, or non-inclusive ofthe contents the upper levels of cache.

With reference now to FIG. 3, there is illustrated a more detailed blockdiagram of a lower level store-in cache memory (e.g., L2 cache 230) inaccordance with one embodiment. In the embodiment of FIG. 3, L2 cache230 includes a cache array 302 and a L2 directory 308 of the contents ofcache array 302. Assuming cache array 302 and L2 directory 308 areset-associative as is conventional, storage locations in system memories108 are mapped to particular congruence classes within cache array 302utilizing predetermined index bits within the system memory (real)addresses. The particular memory blocks stored within the cache lines ofcache array 302 are recorded in L2 directory 308, which contains onedirectory entry for each cache line. While not expressly depicted inFIG. 3, it will be understood by those skilled in the art that eachdirectory entry in cache directory 308 includes various fields, forexample, a tag field that identifies the real address of the memoryblock held in the corresponding cache line of cache array 302, a statefield that indicates the coherency state of the cache line, an LRU(Least Recently Used) field indicating a replacement order for the cacheline with respect to other cache lines in the same congruence class, andinclusivity bits indicating whether the memory block is held in theassociated L1 cache 212.

L2 cache 230 additionally includes an L2 STQ 304 that receives from LSU206 a and temporarily buffers certain memory access requests andsynchronization (barrier) requests. In the described embodiments, thememory access requests that flow through L2 STQ 304 include store-typerequests, as well as copy-type requests and paste-type requests asdescribed further herein. In at least one embodiment, L2 STQ 304 is aunified store queue that buffers requests generated by all hardwarethreads of the affiliated processor core 200.

L2 cache 230 also includes snooper logic 313 including multiple (e.g.,16 or 32) snoop machines 311 a-311 m for servicing remote memory accessrequests originating from processor cores 102 other than the affiliatedprocessor core 200. Each snoop machine 311 can independently andconcurrently handle a remote memory access request “snooped” from localinterconnect 114. As will be appreciated, the servicing of memory accessrequests by L2 cache 230 may require the replacement or invalidation ofmemory blocks within cache array 302. Accordingly, L2 cache 230additionally includes castout logic 315 including multiple CO (castout)machines 310a-310n that manage the removal and writeback of datagranules from L2 cache 230 to system memories 108. In some embodiments,CO machines 310 are utilized to service paste-type requests receivedfrom the associated processor core 200, as discussed further below. L2cache 230 additionally includes master logic 309 including multiple(e.g., 16 or 32) read-claim (RC) machines 312 a-312 n for independentlyand concurrently servicing load (LD) and store (ST) requests receivedfrom the affiliated processor core 200. In some embodiments of theinventions described below, RC machines 312 are also utilized to servicecopy-type requests received from the associated processor core 200. Insome embodiments, servicing of copy-type and paste-type requests isoptionally (as indicated by dashed line illustration) additionally orexclusively performed by a copy-paste engine (CPE) 332, which, ifpresent, is dedicated to servicing such requests. Thus, in someembodiments, copy-type and paste-type requests are serviced exclusivelyby RC machines 312 and CO machines 310; in some embodiments, copy-typeand paste-type requests are serviced exclusively by CPE 332; and in someembodiments, copy-type and paste-type request are serviced by RCmachines 312 and CO machines 310 as well as CPE 332.

L2 cache 230 also includes an RC queue 320 and a CPI (castout pushintervention) queue 318 that respectively buffer data being insertedinto and removed from the cache array 302. RC queue 320 includes anumber of buffer entries that each individually correspond to aparticular one of RC machines 312 such that each RC machine 312 that isdispatched retrieves data from only the designated buffer entry.Similarly, CPI queue 318 includes a number of buffer entries that eachindividually correspond to a particular one of the castout machines 310and snoop machines 311, such that each CO machine 310 and each snoopmachine 311 that is dispatched retrieves data from only the respectivedesignated CPI buffer entry.

Each RC machine 312 also has assigned to it a respective one of multipleRC data (RCDAT) buffers 322 for buffering a memory block read from cachearray 302 and/or received from local interconnect 114 via reload bus323. The RCDAT buffer 322 assigned to each RC machine 312 is preferablyconstructed with connections and functionality corresponding to thememory access requests that may be serviced by the associated RC machine312. At least some of RCDAT buffers 322 have an associated store datamultiplexer M4 that selects data bytes from among its inputs forbuffering in the RCDAT buffer 322 in response to unillustrated selectsignals.

The operation of L2 cache 230 is managed by a cache controller, which inthe embodiment of FIG. 3 includes an arbiter 303, copy-paste dispatchunit (CPD) 300, and selection logic represented by multiplexers M1 andM2. Multiplexer M1 orders the presentation to CPD 300, arbiter 303 andmultiplexer M2 of load, store, copy-type and paste-type requestsreceived from the associated processor core 200. Multiplexer M2additionally receives via snoop bus 326 requests of other processorcores 200 snooped from local interconnect 114. Based on selection inputsprovided by arbiter 303 and/or CPD 300 determined on a desiredarbitration policy, multiplexer M2 selects among the various memoryaccess requests, including local load, local store, local copy-type andpaste-type requests and remote read and write requests, presented to it,and forwards the selected requests to a dispatch pipeline 306 where eachrequest is processed with respect to directory 308 and cache array 302over a given number of cycles. In embodiments in which optional CPE 332is implemented to provide dedicated handling of the copy-type andpaste-type requests of the associated processor core 200, CPD 300 maydirect that some or all of the copy-type and paste-type requestsreceived from multiplexer M1 are directed to CPE 332 rather than passedvia multiplexer M2 and dispatch logic 306 to RC machines 312.

In operation, L2 STQ 304 receives processor store requests, copy-typerequests, paste-type requests, and barrier requests from the affiliatedprocessor core 200. If a barrier request is received in L2 STQ 304, L2STQ 304 may order older requests preceding the barrier request andyounger requests following the barrier request, as discussed furtherbelow. From L2 STQ 304, store data of store requests are transmitted tostore data multiplexer M4 via data path 324, and store requests,copy-type requests, and paste-type requests are passed to multiplexerM1. Multiplexer M1 also receives as inputs load requests from processorcore 200 and directory write requests from RC machines 312. In responseto unillustrated select signals generated by the cache controller,multiplexer M1 selects one of its input requests to forward to arbiter303, CPD 300, and multiplexer M2, which additionally receives as aninput remote requests received from local interconnect 114 via remoterequest path 326. Arbiter 303 schedules local and remote memory accessrequests for processing in dispatch pipeline 306 and, based upon thescheduling, generates a sequence of select signals 328. In response toselect signals 328 generated by arbiter 303, multiplexer M2 selectseither a local request received from multiplexer M1 or a remote requestsnooped from local interconnect 114 as the next memory access request tobe processed in dispatch pipeline 306. If CPE 332 is implemented, CPD300 can direct that none, all, or some of the copy-type and paste-typerequests of the associated processor core 200 received by CPD 300 frommultiplexer M1 are directed to CPE 332 for processing instead ofdispatch pipeline 306.

Each memory access request selected for processing in dispatch pipeline306 by arbiter 303 is placed by multiplexer M2 into dispatch pipeline306. Dispatch pipeline 306 preferably is implemented as a fixed durationpipeline in which each of multiple possible overlapping requests isprocessed for a predetermined number of clock cycles. For example,dispatch pipeline 306 may process each memory access request for fourcycles.

During a first cycle of processing within dispatch pipeline 306, a1-cycle directory read is performed utilizing the request address todetermine if the request address hits or misses in directory 308, and ifthe memory address hits, the coherence state of the memory block withindirectory 308. The directory information, which includes a hit/missindication and the coherence state of the memory block, is returned bydirectory 308 to dispatch pipeline 306 in a subsequent cycle, such asthe fourth cycle. As will be appreciated, no action is generally takenwithin an L2 cache 230 in response to miss on a remote memory accessrequest; such remote memory requests are accordingly discarded fromdispatch pipeline 306. However, in the event of a hit or miss on a localmemory access request or a hit on a remote memory access request, L2cache 230 will service the memory access request, which for requeststhat cannot be serviced entirely within processing unit 104, may entailcommunication on local interconnect 114 via fabric controller 216.

At a predetermined time during processing of the memory access requestwithin dispatch pipeline 306, arbiter 303 transmits the request addressto cache array 302 via address and control path 330 to initiate a cacheread of the memory block specified by the request address. A cache readtakes 2 cycles in the exemplary embodiment. The memory block read fromcache array 302 is transmitted via data path 342 to error correctingcode (ECC) logic 344, which checks the memory block for errors and, ifpossible, corrects any detected errors. For processor load requests, thememory block is also transmitted to load data multiplexer M3 via datapath 340 for forwarding to the affiliated processor core 200.

At the last cycle of the processing of a memory access request withindispatch pipeline 306, dispatch pipeline 306 make a dispatchdetermination. For example, dispatch pipeline 306 may make the dispatchdetermination based upon a number of criteria, including (1) thepresence of an address collision between the request address and aprevious request address currently being processed by a castout machine310, snoop machine 311 or RC machine 312, (2) the directory information,and (3) availability of an appropriate RC machine 312, snoop machine 311and/or CO machine 310 to process the memory access request. If dispatchpipeline 306 makes a dispatch determination that the memory accessrequest is to be dispatched, the memory access request is dispatchedfrom dispatch pipeline 306 to an RC machine 312, a pair of RC/COmachines 310 and 312, or a snoop machine 311, as appropriate. If thememory access request fails dispatch, the failure is signaled to therequestor (e.g., local or remote processor core 200) by a retryresponse. The requestor may subsequently retry the failed memory accessrequest, if necessary.

While an RC machine 312 is processing a local memory access request, theRC machine 312 has a busy status and is not available to service anotherrequest. While an RC machine 312 has a busy status, the RC machine 312may perform a directory write to update the relevant entry of directory308, if necessary. In addition, the RC machine 312 may perform a cachewrite to update the relevant cache line of cache array 302. A directorywrite and a cache write may be scheduled by arbiter 303 during anyinterval in which dispatch pipeline 306 is not already processing otherrequests according to the fixed scheduling of directory reads and cachereads. When all operations for the given request have been completed,the RC machine 312 returns to an unbusy state.

As discussed above, moving a data set in a conventional data processingsystem implementing a RISC architecture undesirably consumes architectedregisters within the processor core to buffer data loaded from systemmemory until the data is stored from the architected registers back tosystem memory. In addition to consuming these vital resources,conventional techniques for moving a data set within system memory mustalso address the disparity in size that commonly exists between thesizes of memory granules (e.g., cache lines or other fixed size regionsof memory) and architected processor registers. For example, in atypical case cache lines may be 128 bytes in length, while architectedprocessor registers may be only 8 or 16 bytes. Consequently, moving anentire cache line of data in a RISC processor typically requiresexecution of an instruction loop including multiple instructions, eachof which moves a register's worth of data. In at least one embodiment,these issues with conventional RISC processors are addressed byimplementing instruction set architecture (ISA) support for copying acache line (or other fixed sized memory granule) into a buffer that isnot visible to user-level code, for “pasting” (i.e., storing) the memorygranule to system memory or other memory-mapped resource, and foraborting a memory move instruction sequence.

Referring now to FIG. 4A, there is depicted a copy_first instruction 400in accordance with one embodiment. As shown, in this embodiment,copy_first instruction 400, which is executable by an execution unitsuch as LSU 206 a to initiate a copy-paste memory move instructionsequence, includes an opcode field 402 containing a predeterminedoperation code assigned to copy_first instructions. Copy_firstinstruction 400 further includes operand fields 404 and 406, which referto registers (respectively referred to as register rA and register rB)used to form the target effective address (i.e., source effectiveaddress) from which a memory granule is to be copied. For example, in anembodiment in which indexed addressing is employed, the effectiveaddress is formed by adding the contents of registers rA and rB, unlessone of the registers is register r0, in which case a zero is used in thecomputation rather than the register contents. Those skilled in the artwill appreciate, however, that indexed addressing is but one of manypossible techniques of determining a target effective address and thatother embodiments may therefore determine the effective addressemploying a different address computation technique and/or using agreater or fewer number of operands.

When copy_first instruction 400 is executed by an execution unit 206 ofa processor core 200 (e.g., by LSU 206 a), the execution unit 206computes the target effective address (i.e., source effective address)from the operands of copy_first instruction 400. The target effectiveaddress is translated by MMU 210 to determine the corresponding sourcereal address. The execution unit 206 then transmits a copy_first requestincluding a transaction type indicating the type of the request and thesource real address to the associated L2 cache 230 for servicing.

With reference now to FIG. 4B, there is illustrated a paste_lastinstruction 410 in accordance with one embodiment. As can be seen bycomparison to FIG. 4B, paste_last instruction 410, which is executableby an execution unit such as LSU 206 a to end a memory move instructionsequence, is formed similarly to copy_first instruction 400. Inparticular, paste_last instruction 410 includes an opcode field 412containing a predetermined operation code assigned to paste_lastinstructions. Paste_last instruction 410 further includes operand fields414 and 416, which refer to registers (respectively referred to asregister rA and register rB) used to form the target effective addressto which a memory granule is to be pasted (i.e., stored). For example,in an embodiment in which indexed addressing is employed, the effectiveaddress is formed by adding the contents of registers rA and rB, unlessone of the registers is register r0, in which case a zero is used in thecomputation rather than the register contents. Again, those skilled inthe art will appreciate that indexed addressing is but one of manypossible techniques of determining a target effective address and thatother embodiments may determine the effective address employing adifferent address calculation technique and/or using a greater or fewernumber of operands.

When paste_last instruction 410 is executed by an execution unit 206 ofa processor core 200 (e.g., by LSU 206 a), the execution unit 206computes the target effective address (i.e., destination effectiveaddress) from the operands of paste_last instruction 410. Thedestination effective address is translated by MMU 210 to determine thecorresponding destination real address. The execution unit 206 thentransmits a paste_last request including a transaction type indicatingthe type of the request and the destination real address to theassociated L2 cache 230 for servicing. As shown in FIG. 3, CPD 300returns to processor core 200 a complete indication via bus 334 toindicate servicing of the paste_last request by L2 cache 230 is completeand optionally additionally returns a pass/fail/busy indication via bus336 to indicate whether or not the memory move terminated by thepaste_last instruction 410 was performed (i.e., was successful).

Referring now to FIG. 4C, there is depicted a cp_abort instruction 420in accordance with one embodiment. Cp_abort instruction 420, which isexecutable by an execution unit such as LSU 206 a to abort a memory moveinstruction sequence, includes an opcode field 422. In a preferredembodiment, cp_abort instruction 420 includes no operand fields. Uponexecution by an execution unit 206 of a processor core 200 (e.g., by LSU206 a), the execution unit 206 generates a cp_abort request and, ifnecessary, forwards the request to the associated L2 cache 230.

With reference now to FIG. 5A, there is illustrated a valid memory moveinstruction sequence 500 including copy_first and paste_lastinstructions in accordance with one embodiment. In this example,instruction sequence 500 begins with a copy_first instruction 502 (whichhas a source effective address shown as address A) followed in programorder (optionally after one or more intervening instructions that arenot copy_first or paste_last instructions) by paste_last instruction 504(which has a destination effective address shown as address B). Theexecution of instruction sequence 500 causes the cache line (or someother fixed sized memory granule) corresponding to source effectiveaddress A to be copied into a non-architected buffer (in response toexecution of copy_first instruction 502) and then (in response toexecution of paste_last instruction 504) stored to the memory-mappedresource (e.g., cache line or other fixed size memory granule)corresponding to destination effective address B. The paste_lastinstruction 504 also causes CPD 300 to reset its internal logic inpreparation to receive a next memory move instruction sequence. Inembodiments in which the non-architected memory buffer utilized tobuffer the target memory granule is advantageously sized to accommodatethe entire target memory granule, performance is significantly improvedas compared with conventional RISC memory move sequences, which as notedabove utilize a loop of instructions to copy small chunks of a firstcache line into multiple processor registers and then writing smallchunks of the data from the multiple processor registers to a secondtarget cache line. It should be appreciated that in some cases, thetarget effective address of paste_last instruction 504 can correspond toa storage location in a system memory 108. In other cases, the targeteffective address of paste_last instruction 504 can correspond to amemory-mapped resource, such as AS 218 or device 220 (e.g., a hardwareaccelerator) in one of processing units 104. It should also be notedthat in either case memory move instruction sequence 500 advantageouslyemploys address translation (via MMU 210) for each of instructions 502and 504, and consequently these address translation data structures(e.g., page table entries or the like) provide not onlyeffective-to-real address translation, but also memory protection bitsthat can selectively be used to restrict access to both the resourcecorresponding to the source address of the copy and the resourcecorresponding to the destination address of the paste.

Referring now to FIG. 5B, there is depicted an exemplary illegalinstruction sequence 510 including a paste_last instruction 512 notpreceded by a copy_first instruction. Because instruction sequence 510attempts to paste non-existent data to destination effective address C,the requests generated through execution of instruction sequence 510 arerecognized as an illegal instruction sequence, and CPD 300 consequentlyreturns a fail indication (if implemented) to the associated processorcore 200 via bus 336 in response to receipt of the paste_last requestcorresponding to paste_last instruction 512. In addition, CPD 300 resetsits internal logic in preparation to receive a next memory moveinstruction sequence.

FIG. 5C illustrates another illegal instruction sequence 520. In thiscase, instruction sequence 520 is illegal because it includes multiplecopy_first instructions 522, 524 without an intervening paste_lastinstruction to signify completion of the memory move initiated bycopy_first instruction 522. For instruction sequences like instructionsequence 520, handling can vary between implementations. For example, insome implementations all instructions between copy_first instruction 524and paste_last instruction 526 are ignored. In other implementations,the processor core 200 may attempt to perform operations indicated byinstructions between copy_first instruction 524 and paste_lastinstruction 526. In either case, CPD 300 returns a fail indication (ifimplemented) to the associated processor core 200 via bus 336 inresponse to receipt of the paste_last request corresponding topaste_last instruction 526 and resets its internal logic in preparationto receive a next memory move instruction sequence.

Referring now to FIG. 5D, there is depicted an exemplary memory moveinstruction sequence 530. In this example, a first hardware thread T0 isexecuting a well-formed memory move instruction sequence initiated bycopy_first instruction 532. Following execution of copy_firstinstruction 532 and prior to execution of the corresponding paste_lastinstruction, hardware thread T0 is interrupted, for example, by anoperating system (OS) or hypervisor, and the memory move instructionsequence is subsequently re-dispatched on a second hardware thread T1.On hardware thread T0, the control program (e.g., OS or hypervisor)executes a cp_abort instruction 534, which frees the memory movefacilities of thread T0 in L2 cache 230 to be able to process a newmemory move sequence. Before the OS or hypervisor causes the memory moveinstruction sequence to be re-dispatched on hardware thread T1, the OSor hypervisor also executes a cp_abort instruction 536 on hardwarethread T1 that frees the memory move facilities of hardware thread T1 inL2 cache 230. The well formed memory move instruction sequence thenresumes on thread T1. When paste_last instruction 538 is executed onhardware thread T1, the corresponding paste_last request will appear toL2 cache 230 as lacking a preceding copy_first request (as in FIG. 5B)and will therefore cause a fail indication to be returned via bus 336.In response to the fail indication, the user level software will simplyrepeat the memory move instruction sequence, which will pass on asubsequent (if not the immediately next) execution.

Implementation of an explicit cp_abort instruction (and transmission ofthe corresponding cp_abort request to L2 cache 230) eliminates therequirement to port state and other information between threads on acontext switch (although some embodiments disclosed herein support thiscapability). Further, the cp_abort instruction desirably enablesimplementation of checking for well-formed memory move instructionsequences in the storage subsystem (e.g., in L2 cache 230) rather thanin processor core 200.

With reference now to FIG. 5E, there is illustrated another exemplaryinstruction sequence 540 including a context switch during execution ofa memory move. As can be seen, the portion of instruction sequence 540executed on hardware thread T0 is an illegal instruction sequencesimilar to that shown in FIG. 5C in that it includes copy_firstinstructions 542 and 544 without an intervening paste_last instruction.However, because the malformed portion of instruction sequence 540 isexecuted on hardware thread T0 prior to the context switch (andexecution of the cp_abort instruction 546 that precedes it) and becausethe remaining portion of instruction sequence 540 executed on hardwarethread T1 (i.e., the copy_first instruction 550 and paste_lastinstruction 552 that follow cp_abort 548) is well formed, the portion ofinstruction sequence 540 executed on hardware thread T1 receives a passindication.

Those skilled in art will appreciate that in other embodimentsinstruction sequence 540 of FIG. 5E could alternatively be flagged asfailing, for example, by migrating state information for the differenthardware threads within the storage subsystem or by implementingadditional state information in the processor core 200. However, in atleast some embodiments, implementing the additional logic to supportdetection of this particular corner case entails more hardware expensethan is worthwhile.

Having described an exemplary data processing environment and exemplaryinstructions that can be used to form memory move instruction sequences,architectural level pseudocode descriptions of the exemplaryinstructions are now given. These pseudocode descriptions describe,independently of actual implementation, the functions performed by theinstructions and how the instructions manipulate memory move statevariables.

In an exemplary embodiment, the per-hardware-thread memory movevariables manipulated by the memory move instructions include at least:(1) “move in progress” (MIP) and (2) valid (V). MIP is a flag that isset to indicate that a copy_first instruction initiating a memory moveinstruction sequence has been detected. MIP is set in response todetection of the copy_first instruction if MIP is not set. MIP is resetin response to detection of a paste_last instruction or cp_abortinstruction.

The valid (V) variable is a flag that indicates whether or not thememory move instruction sequence is still well-formed (e.g., acopy_first instruction has been detected, but not the correspondingcopy_last instruction). The valid flag is set in response to detectingthe first copy_first in a memory move instruction sequence and is resetin response to detecting an invalid instruction after the copy_firstinstruction (e.g., another copy_first instruction without an interveningpaste_last instruction) or in response to detecting a paste_lastinstruction that terminates the memory move instruction sequence or inresponse to detecting a cp_abort instruction. In general, MIP is theprimary variable and reflects whether or not a valid memory moveinstruction sequence is in progress. Consequently, if MIP is reset toindicate completion of a memory move instruction sequence, the abortingof a memory move instruction sequence, or the invalidity of memory moveinstruction sequence, the resetting of other variables (e.g., the Vflag) is optional.

In one embodiment, the copy_first instruction can be described inpseudocode as follows:

copy_first if (mip == 1) then   v <- 0; // copy_first detected whensequence was already started. else   v <-1; // copy_first properlyinitiates a memory move   mip <- 1 // indicate that memory moveunderway.   copy data to buffer // copy the data. fi

According to this pseudocode, processing of a copy_first instructiondetermines if a memory move instruction sequence has already beeninitiated (e.g., if MIP is set). If so, the copy_first instructionresets the valid flag (e.g., to 0) to indicate that the memory moveinstruction sequence is invalid. It should be noted that no copy of dataresiding at the source address is performed in this case, and based onthe valid flag being reset, any subsequent pastes in the memory moveinstruction sequence also will not be performed. If, however, adetermination is made that the memory move instruction sequence is wellformed so far (e.g., MIP is initially reset to 0), then processing ofthe copy_first instruction sets MIP (e.g., to 1) to indicate that amemory move instruction sequence has been initiated and additionallysets V (e.g., to 1) to indicate that the memory move instructionsequence is valid so far. In addition, the processing of the copy_firstinstruction logically copies the data granule identified by the sourceaddress to a buffer.

In one embodiment, the paste_last instruction can be described inpseudocode as follows:

paste_last if (mip == 0 OR v == 0) then   mip <- 0; // reset flags fornext sequence   v <- 0;   return fail to CR // paste_last is alone orsequence is already invalid. else   paste data to memory from copybuffer; // do the write. //   mip <- 0; // reset flags for next sequence  v <- 0; //   return pass to CR; // fi

Processing of the paste_last instruction first checks if MIP is reset(e.g., the paste_last instruction was not preceded by a copy_firstinstruction as in FIG. 5B) or if V is reset (e.g., because multiplecopy_first instructions are placed at the beginning of an instructionsequence as in FIG. 5C). If either of these conditions is detected, theMIP and V flags are reset, a fail indication is returned to theprocessor core, and no data is written to the memory-mapped resource. Onthe other hand, if neither of these conditions is detected, the contentsof the buffer are written to the memory-mapped resource. In addition,after that write is complete, a pass indication is returned to theprocessor core, and the MIP and V flags are reset.

It should be noted that in the embodiment represented by the abovepseudocode, once it is detected that a memory move instruction sequenceis malformed, copies from memory and writes to memory-mapped resourcecease to be performed. It should be appreciated that this is a designchoice that can differ in other embodiments. For example, in at leastone embodiment, a memory copy may be performed for each copy_firstinstruction, and/or a write may be performed for each paste_lastinstruction regardless of the detection of a malformed memory moveinstruction sequence.

In one embodiment, the cp_abort instruction can be described inpseudocode as follows:

cp_abort mip <- 0; // Memory move instruction sequence no longer inprocess v <- 0; // Reset valid.

As indicated above, the cp_abort instruction resets the MIP and V flags.In this embodiment, resetting both of the MIP and V flags causes thecontents of the buffer, if any, to be abandoned.

Referring now to FIG. 6, there is depicted a more detailed block diagramof a copy-paste dispatch unit (CPD) 300 in accordance with oneembodiment. In the depicted example, CPD 300 includes a copy addressregister 602 that specifies a source (real) address from which a datagranule is to be copied, a paste address register 604 that specifies adestination (real) address to which a data granule is to be pasted(written). In addition, CPD 300 includes an MIP flag 606 and V flag 608as described above. An additional copy (C) flag 610 supporting streamsof copy-type and paste-type instructions and a busy (B) flag 612supporting targeting devices 220 with memory move instructions sequencescan be independently implemented in some embodiments, as describedbelow. In embodiments including optional support for speculation ofmemory move instructions sequences as described further herein, CPD 300further includes speculative flags 616-622 (denoted herein by prime (x′)notation) corresponding to flags 606-612. CPD 300 also includes controllogic 600 that implements the semantics for at least the copy_first,paste_last and cp_abort requests described above.

In one preferred embodiment, control logic 600 responds to a copy-type(e.g., copy_first) request by placing the source address in copy addressregister 602, but does not initiate the indicated copy operation until acorresponding paste-type (e.g., paste_last) request is received. Bydelaying initiation of the copy operation until the correspondingpaste-type request is received, resources such as an RC machine 312 andRCDAT buffer 322 that are utilized to perform the copy operation canremain available for allocation to other operations until it isconfirmed that the memory move instruction sequence is not malformed orhas not been migrated to another hardware thread via a context switch.It is, of course, possible to instead allocate the resources in responseto receipt of the copy-type request and release the resources inresponse to detecting the memory move instruction sequence has becomemalformed or has been moved to another hardware thread, but thisalternative implementation generally results in lower resourceavailability and lower performance.

With reference now to FIG. 7, there is illustrated a high level logicalflowchart of an exemplary method by which a processing unit 104 handlesmemory access requests initiated by execution of memory moveinstructions in accordance with the embodiment of FIG. 6. As with theother flowcharts presented herein, steps are presented in logical ratherthan strictly chronological order and in some embodiments one or moresteps can be performed in an alternative order or concurrently. In thefollowing description, it is assumed that the illustrated processing isperformed by CPD 300 of FIG. 6. The flowchart further assumes anembodiment in which L2 STQ 304 maintains relative program sequence ofcopy-type and paste-type requests. It should also be noted that FIG. 7represents optional steps utilizing blocks shown in dashed lineillustration. These steps are performed only in embodiments in whichmemory-mapped devices, such as AS 218 and devices 220 can be targets ofmemory move instruction sequences in addition to system memories 108. Inembodiments in which only system memories 108 can be targets of memorymove instruction sequences, such steps are omitted.

The process of FIG. 7 begins at block 700 and then proceeds to block702, which illustrates CPD 300 resetting (e.g., to 0) MIP flag 606 and Vflag 608. The process then proceeds to blocks 704, 706 and 708, whichillustrate CPD 300 monitoring for receipt of any of a copy_first,paste_last or cp_abort request from the associated processor core 200.In response to receipt of a copy_first request at block 704, CPD 300determines at block 710 whether or not MIP flag 606 is set (e.g., to 1).If so, CPD 300 determines that the instruction sequence is malformed andaccordingly resets V flag 608 (block 712). In embodiments in which thetarget of memory move instruction sequences is restricted to systemmemory 108, CPD 300 thereafter resumes monitoring for memory moverequests, as indicated by the process returning to blocks 704-708. Inother embodiments in which the target of a memory move instructionsequences can be AS 218 or a device 220, the process resets (e.g., to 0)B flag 612 prior to returning to blocks 704-708, as shown at block 718.

In response to CPD 300 determining at block 710 that MIP flag 606 is notset, CPD 300 sets MIP flag 606 and V flag 608 to indicate initiation ofa well formed memory move instruction sequence (block 714) and placesthe source (real) address specified by the copy_first request in copyaddress register 602 (block 716). In embodiments in which the target ofmemory move instruction sequences is restricted to system memory 108,the process then returns to blocks 704-708, which have been described.In other embodiments in which the target of a memory move instructionsequences can be AS 218 or a device 220 in addition to system memories108, the process resets B flag 612 prior to returning to blocks 704-708,as shown at block 718.

Referring now to block 706, in response to receipt of a paste_lastrequest, CPD 300 determines whether either of MIP flag 606 or V flag 608is reset (block 720). If so, the memory move instruction sequence ismalformed. Consequently, CPD 300 returns a CMPLT indication (indicatingthe end of a memory move instruction sequence) and a fail indication(indicating that the memory move instruction sequence failed) to theprocessor core 200 via buses 334 and 336, respectively (block 722). Inresponse to the CMPLT and fail indications, processor core 200 resets Ebit 205 (e.g., to 0) to signify failure of the memory move instructionsequence and, in other embodiments in which the target of a memory movecan be an AS 218 or a device 220, resets (e.g., to 0) G bit 207 toindicate that the cause of failure was not a BUSY response from thetarget of the memory move instruction sequence. At block 724, CPD 300additionally resets MIP flag 606 and V flag 608. Thereafter, the processreturns to block 704-708, after resetting, if necessary, B flag 612 atblock 718.

If, on the other hand, a malformed instruction sequence is not detectedat block 720, CPD 300 places the destination (real) address specified bythe paste_last request into paste address register 604 (block 730). Inaddition, CPD 300 places in dispatch pipeline 306 a request to dispatcha RC machine 312 and CO machine 310, where the RC machine 312 is forperforming a copy of the target data granule into the correspondingRCDAT buffer 322 and the CO machine 310 is for performing the paste ofthe data granule from the RCDAT buffer 322 to the destination (block732). Thus, this arrangement advantageously allows existing circuitry(i.e., RC machine 312, RCDAT 322 and CO machine 310) to be leveraged toperform an additional function. As indicated at block 734, if thedispatch of the matched pair of RC machine 312 and CO machine 310 fails,the process returns to block 732. If the dispatch from dispatch pipeline306 is successful, CPD 300 awaits completion of the indicated copy andpaste operations (block 736). As will be appreciated, in which an AS 218or device 220 is assigned a destination real address and/or contains thestorage location associated with the destination real address of thepaste_last request, the paste operation can entail the CO machine 310issuing a command on the interconnect fabric to write the data granuleinto the memory-mapped storage location. The AS 218 or device(s) 220 canbe configured to perform any of a number of operations in response tosuch a command. As one example, a device 220 can be configured toinitiate a direct memory access (DMA) utilizing the destination realaddress or another address, to perform a predetermined computation on adata set, or to initiate a communication. Other examples of theoperation an AS 218 are described further below with respect to FIGS.23-27.

As indicated by block 738, in embodiments in which AS 218 and device(s)220 can serve as targets of memory move instruction sequences, CPD 300determines in response to an affirmative determination at block 736whether or not B flag 612 has been set (e.g., to 1) to indicate that amemory-mapped device, such as an AS 218 or device 220, could not acceptthe memory move data. If not, or in cases in which the memory moveinstruction sequence targets a real address in system memory 108 ratherthan a memory-mapped device (in which case B flag 612 is never set), theprocess proceeds to block 740. However, in response to a determinationthat B flag 612 was set during the memory move instruction sequence, theprocess instead proceeds to block 739, which illustrates CPD 300returning a CMPLT indication and busy indication to processor core 200via buses 334 and 336, respectively. In response to the CMPLT and busyindications, processor core 200 resets E bit 205 (e.g., to 0) toindicate failure of the memory move instruction sequence and sets G bit207 (e.g., to 1) to indicate the cause of failure was a BUSY responsefrom the target of the memory move instruction sequence. Thereafter, theprocess passes to block 724 and following blocks, which have beendescribed.

Block 740 depicts CPD returning a CMPLT indication (indicating the endof a memory move instruction sequence) and a pass indication (indicatingthat the memory move instruction sequence passed) to the processor core200 via buses 334 and 336, respectively. In response to the CMPLT andpass indications, processor core 200 sets E bit 205 to indicate successof the memory move instruction sequence and resets G bit 207.Thereafter, the process passes to block 724 and following blocks, whichhave been described.

Referring now to block 708, in response to receipt by CPD 300 of acp_abort request, CPD 300 resets MIP flag 606 and V flag 608 (block750). In embodiments in which the targets of memory move instructionsequences are restricted to real addresses in system memories 108, theprocess returns to blocks 704-708 following block 750. In otherembodiments in which the target of the memory move instruction sequenceis permitted to be a memory-mapped device (e.g., an AS 218 or a device220), the process instead proceeds to blocks 752, which illustrates CPD300 resetting B flag 612 (e.g., to 0). The process then returns toblocks 704-708, which have been described.

In the embodiment of FIG. 7, the state variables represented by MIP flag606 and V flag 608 are maintained with the storage subsystem andspecifically within CPD 300. In an alternative embodiment such as thatshown in FIG. 8, these state variables are not tracked in the storagesubsystem, but are instead tracked in processor core 200, for example,in a machine state register (MSR) 820, which includes an MIP flag 822and V flag 824. An additional copy (C) flag 826 supporting streams ofcopy-type and paste-type instructions and a busy (B) flag 828 supportingtargeting devices 220 with memory move instructions sequences can beindependently implemented in some embodiments, as described below.Processor core 200 may also optionally include a real address (RA)register 830 utilized in some embodiments to support migration of memorymove instruction sequences between threads, as discussed below withreference to FIGS. 19-20. As noted above, in embodiments furtherincluding optional support for speculative execution of memory moveinstruction sequences, processor core 200 may further includespeculative flags 840 including MIP′ flag 842, V′ flag 844, C′ flag 846and B′ flag 848 corresponding to flags 822-828. While in this embodimentCPD 800 retains control logic 810 to manage servicing of memory moverequests received from processor core 200, additional control logic 812is implemented in processor core 200 (e.g., in LSU 206 a) to, amongother things, manage updates to MIP flag 822 and V flag 824.

While control logic 812 is implemented in the more expensive transistorsfound in processor core 200 in this case, this arrangement facilitatesthe transfer of state variables between hardware threads when a memorymove instruction sequence is migrated by a context switch. Consequently,illegal instruction sequences that are interrupted by a context switch(such as that given in FIG. 5D) can be detected. To enable thisfunctionality, the architectural semantics of the cp_abort instructionare modified such that it only resets the V flag, but does not reset theMIP flag. Thus, in this embodiment, the MIP flag is only reset by thepaste_last instruction.

With reference now to FIG. 9, there is illustrated a high level logicalflowchart of an exemplary method by which a processor core handlesmemory access requests initiated by execution of memory moveinstructions in accordance with the embodiment of FIG. 8. In thefollowing description, it is assumed that the illustrated processing isperformed by control logic 812 of FIG. 8. It should also be noted thatFIG. 9 represents optional steps utilizing blocks shown in dashed lineillustration. These steps are performed only in embodiments in whichmemory-mapped devices, such as AS 218 and devices 220 can be targets ofmemory move instruction sequences in addition to system memories 108. Inembodiments in which only system memories 108 can be targets of memorymove instruction sequences, such steps are omitted.

The process of FIG. 9 begins at block 900 and then proceeds to block902, which illustrates control logic 812 resetting (e.g., to 0) MIP flag822 and V flag 824. The process then proceeds to blocks 904, 906 and908, which illustrate control logic 812 monitoring for receipt from ISU202 of any of copy_first, paste_last or cp_abort instructions. Inresponse to receipt of a copy_first instruction at block 904, controllogic 812 determines at block 910 whether or not MIP flag 822 is set(e.g., to 1). If so, control logic 812 determines that the instructionsequence is malformed and accordingly resets V flag 824 (block 912). Inembodiments in which the target of memory move instruction sequences isrestricted to system memory 108, control logic 812 thereafter resumesmonitoring for memory move requests, as indicated by the processreturning to blocks 904-908. In other embodiments in which the target ofa memory move instruction sequences can be AS 218 or a device 220 inaddition to system memories 108, the process resets (e.g., to 0) B flag828 prior to returning to blocks 904-908, as shown at block 918.

In response to control logic 812 determining at block 910 that MIP flag822 is not set, control logic 812 sets MIP flag 822 and V flag 824 toindicate initiation of a well formed memory move instruction sequence(block 914) and transmits a copy_first request specifying the source(real) address to the associated L2 cache 230 (block 916). The processthen returns to blocks 904-908, which have been described. Inembodiments in which the target of memory move instruction sequences isrestricted to system memory 108, control logic 812 thereafter resumesmonitoring for memory move requests, as indicated by the processreturning to blocks 904-908. In other embodiments in which the target ofa memory move instruction sequences can be AS 218 or a device 220 inaddition to one of system memories 108, the process resets (e.g., to 0)B flag 828 prior to returning to blocks 904-908, as shown at block 918.

Referring now to block 906, in response to receipt of a paste_lastinstruction from ISU 202, control logic 812 determines whether either ofMIP flag 822 or V flag 824 is reset (block 920). If so, the memory moveinstruction sequence is malformed. Consequently, control logic 812resets E bit 205 of CR 204 (e.g., to 0) to indicate failure of thememory move instruction sequence (block 922) and, in embodiments inwhich a memory-mapped device can be the target of a memory moveinstruction sequence, also resets G bit 207 of CR 204 (e.g., to 0) toindicate that the cause of failure was not a BUSY response from thetarget of the memory move instruction sequence (block 923). As shown atblock 924, control logic 812 also resets MIP flag 822 and V flag 824(block 924). Thereafter, the process returns to block 904-908, afterresetting, if necessary, B flag 828 at block 918.

Returning to block 920, if a malformed instruction sequence is notdetected at block 920, control logic 812 transmits a paste_last requestspecifying the destination (real) address to L2 cache 230 (block 930).Control logic 812 then awaits receipt of a CMPLT indication from theassociated L2 cache 230 indicating that the requested paste operation iscomplete (block 936). In embodiments in which the target of the memorymove instruction sequence can be a memory-mapped device, control logic812 then determines at block 938 whether or not B flag 828 is set toindicate that the target device provided a BUSY response to the memorymove and thus was not able to accept the incoming data. If not (or inembodiments in which block 938 is omitted), the process proceeds toblock 940, which illustrates control logic 812 setting E bit 205 (e.g.,to 1) to indicate success of the memory move instruction sequence. Inembodiments in which the target of the memory move instruction sequenceis permitted to be a memory-mapped device (e.g., AS 218 or device 220),control logic 812 also resets G bit 207 (e.g., to 0) to indicate that noBUSY response was received (block 941). If, however, control logic 812determines at block 938 that B flag 828 is set, control logic 812 resetsE bit 205 (e.g., to 0) to indicate failure of the memory moveinstruction sequence and sets G bit 207 (e.g., to 1) to indicate a BUSYresponse from the target of the memory move instruction sequence was thecause of failure (block 939). Following block 939 or block 941, theprocess returns to blocks 924 and following blocks, which have beendescribed.

Referring now to block 908, in response to receipt by control logic 812of a cp_abort request, control logic 812 resets V flag 826 (block 950).In embodiments in which the target of the memory move instructionsequence can be only a system memory 108, the process returns to blocks904-908 following block 950. In other embodiments in which the target ofthe memory move instruction sequence is permitted to be a memory-mappeddevice (e.g., an AS 218 or a device 220), the process instead proceedsto block 952, which illustrates control logic 812 resetting B flag 828in MSR 820. Thereafter, the process returns to blocks 904-908, whichhave been described.

Referring now to FIG. 10, there is depicted a high level logicalflowchart of an exemplary method by which a store-in lower level cachememory handles memory access requests initiated by execution of memorymove instructions in accordance with the embodiment of FIG. 8. In thefollowing, the operations shown in FIG. 10 are described as beingperformed by control logic 810 of CPD 800, which receives copy_first andpaste_last requests from L2 STQ 304 in program sequence.

The process begins at block 1000 and then proceeds to blocks 1002 and1004, which illustrate control logic 810 monitoring for receipt ofeither a copy_first request or paste_last request from the associatedprocessor core 200, as discussed above with reference to blocks 916 and930 of FIG. 9. In response to receipt of a copy_first request, controllogic 810 places the source (real) address specified by the copy_firstrequest into copy address register 802 (block 1006). The process thenpasses from block 1006 to block 1004.

In response to receipt of a paste_last request at block 1004, controllogic 810 places the destination (real) address specified by thepaste_last request into paste address register 804 (block 1008). Inaddition, control logic 810 places in dispatch pipeline 306 of L2 cache230 a request to dispatch a RC machine 312 and CO machine 310, where theRC machine 312 is for performing a copy of the target data granuleidentified by the source address in the copy address register 602 intothe corresponding RCDAT buffer 322 and the CO machine 310 is forperforming the paste of the data granule from the RCDAT buffer 322 tothe destination address in memory specified by paste address register604 (block 1020). As indicated at block 1022, if the dispatch of thematched pair of RC machine 312 and CO machine 310 fails, the processreturns to block 1020. If the dispatch from dispatch pipeline 306 issuccessful, control logic 810 awaits completion of the indicated copyand paste operations (block 1024). Once the copy and paste operationsare complete, as indicated, for example, by done signal 335, controllogic 810 returns a CMPLT indication (indicating the end of a memorymove instruction sequence) and a pass indication (indicating that thememory move instruction sequence passed) to the processor core 200 viabuses 334 and 336, respectively (block 1026). Thereafter, the processreturns to blocks 1002-1004, which have been described.

Another design variation shown in FIG. 3 in dashed line illustrationemploys a special purpose copy-paste engine (CPE) 332 to service copyand paste requests rather than, or in addition to, RC machines 312 andCO machines 310. FIG. 11 illustrates a high level block diagram of anexemplary embodiment of CPE 332. In the illustrated embodiment, CPE 1100includes one or more cp_RC machines 1100, each of which is dedicated toperforming copy operations indicated by copy-type requests, and one ormore cp_CO machines 1102, each of which is dedicated to performing pasteoperations indicated by paste-type requests. In addition, CPE 332includes a set of cp_RCDAT buffers 1104 into which data granules arecopied from memory by cp_RC machine(s) 1100 and from which data granulesare written to memory by cp_CO machine(s) 1102. One advantage ofimplementing cp_RC machines 1100 and cp_CO machines 1102 as dedicatedmachines is that these state machines can be considerably simpler indesign than the RC machines 312 and CO machines 310, which are designedto service a variety of requests.

It should be noted that the heretofore described embodiments have beendescribed as handling only one copy_first/paste_last instruction pair ina memory move instruction sequence. Those skilled in the art willrecognize that by concurrently using multiple RC/CO machines and/or byimplementing multiple cp_RC and cp_CO machines, multiplecopy_first/paste_last instruction pairs can be serviced at the sametime. Nothing requires that the copy_first/paste_last instructions andthe associated requests to the storage subsystem be performed in programorder. Further, even if adherence to program order were architecturallyrequired or selected, each copy operation could still be performed inany chronological order with respect to other copy operations and withrespect to the paste operations (other than its corresponding pasteoperation), and each paste operation can be performed in program orderwith respect to its corresponding copy operation and the other pasteoperations.

In accordance with another aspect of the inventions disclosed herein, amemory move instruction sequence can be extended to include a stream ofmultiple copy-and-paste instruction pairs. Referring now to FIG. 12A,there is illustrated a copy instruction suitable for use in a stream ofmultiple copy and paste instructions in accordance with one embodiment.As shown, in this embodiment, copy instruction 1200, which is executableby an execution unit such as LSU 206 a to initiate a copy operation in amemory move instruction sequence, includes an opcode field 1202containing a predetermined operation code assigned to copy instructions.Copy instruction 1200 further includes operand fields 1204 and 1206,which refer to registers (respectively referred to as register rA andregister rB) used to form the target effective address (i.e., sourceaddress) from which a memory granule is to be copied. As with thecopy_first instruction described above, the target effective address ofcopy instruction 1200 can be formed from the contents of registers rAand rB utilizing indexed addressing. Those skilled in the art willappreciate, however, that indexed addressing is but one of many possibletechniques of determining a target effective address and that otherembodiments may therefore determine the effective address employing adifferent technique and/or using a greater or fewer number of operands.

In the embodiment of FIG. 3, when copy instruction 1200 is executed byan execution unit 206 of a processor core 200 (e.g., by LSU 206 a), theexecution unit 206 computes the source effective address from theoperands of copy instruction 1200. The source effective address istranslated by MMU 210 to determine the corresponding source realaddress. The execution unit 206 then transmits a copy request includinga transaction type indicating the type of the request and the sourcereal address to the associated L2 cache 230 for servicing.

With reference now to FIG. 12B, there is illustrated a paste instructionsuitable for use in a stream of multiple copy and paste instructions inaccordance with one embodiment. Paste instruction 1210 includes anopcode field 1212 containing a predetermined operation code assigned topaste instructions. Paste instruction 1210 further includes operandfields 1214 and 1216, which refer to registers (respectively referred toas register rA and register rB) used to form the target (i.e.,destination) effective address to which a memory granule is to be pasted(i.e., stored). Again, those skilled in the art will appreciate that invarious embodiments indexed addressing or some alternative technique ofdetermining a target effective address can be employed and that in otherembodiments a greater or fewer number of operands can be used.

In the embodiment of FIG. 3, when paste instruction 1210 is executed byan execution unit 206 of a processor core 200 (e.g., by LSU 206 a), theexecution unit 206 computes the target (i.e., destination) effectiveaddress from the operands of paste instruction 1210. The destinationeffective address is translated by MMU 210 to determine thecorresponding destination real address. The execution unit 206 thentransmits a paste request including a transaction type indicating thetype of the request and the destination real address to the associatedL2 cache 230 for servicing.

Given these additional copy and paste instructions, a legal memory moveinstruction stream begins with a copy_first instruction, includes zeroor more instruction pairs including a paste instruction followed by acopy instruction, and ends with a paste_last instruction, as shown, forexample, in FIG. 13A. In this example, memory move instruction sequence1300 begins with copy_first instruction 1302, is followed by twopaste-then-copy instruction pairs including paste instructions 1304 and1308 and copy instructions 1306 and 1310, and ends with paste_lastinstruction 1312. As discussed above with reference to FIG. 5B and FIG.5C, in a preferred embodiment, instruction sequences including an orphanpaste_last instruction and multiple copy_first instructions without anintervening paste_last instruction remain illegal. Similarly, in apreferred embodiment, instruction sequences, such as instructionsequence 1320 of FIG. 13B and instruction sequence 1330 of FIG. 13Cwhich contain an orphan paste instruction 1322 or orphan copyinstruction 1332, are similarly illegal. Further, as shown in FIG. 13D,in a preferred embodiment, an instruction sequence 1350 in which acopy_first instruction 1352 is followed by a copy instruction 1354without an intervening paste instruction is also illegal. FIG. 13Eillustrates an additional illegal instruction sequence 1360 thatproperly begins with a copy_first instruction 1362 properly followed bya paste instruction 1364 and copy instruction 1366, but which improperlyomits a paste_last instruction before a next copy_first instruction1368.

FIG. 13F illustrates a final example of an instruction sequenceincluding a context switch during execution of a memory move. As shown,the portion of instruction sequence 1370 executed on hardware thread T0is an illegal instruction sequence similar to that shown in FIG. 5E inthat it includes copy_first instruction 1372 followed by a copyinstruction 1374 without an intervening paste instruction. However,because the malformed portion of instruction sequence 1370 is executedon hardware thread T0 prior to the context switch (and execution of thecp_abort instruction 1375 that precedes it) and because the remainingportion of instruction sequence 1370 executed on hardware thread T1(i.e., copy_first instruction 1378, paste instruction 1380, copyinstruction 1382, and paste_last instruction 1384 that follow cp_abort1376) is well formed, the portion of instruction sequence 1370 executedon hardware thread T1 receives a pass indication. Again, those skilledin art will appreciate that in other embodiments instruction sequence1370 of FIG. 13F could alternatively be flagged as failing, for example,by migrating state information for the different hardware threads withinthe storage subsystem or by implementing additional state information inthe processor core 200.

In at least one embodiment in which copy-paste streams includingmultiple copy-paste pairs are supported, the number of state variablesutilized to track the progress of the memory move is expanded from twoto three. In addition to the MIP and V flags previously described, anadditional copy (C) flag that tracks whether or not the last operationin a memory move instruction sequence was a copy-type instruction ofsome form (e.g., copy or copy_first). In the embodiment of FIG. 6, the Cflag can be implemented in the storage subsystem, for example, in CPD300 as C flag 610. In the alternative embodiment of FIG. 8, the C flag826 can alternatively be implemented in processor core 200, for example,within MSR 820. In general, MIP and V are the primary variable andreflect whether or not a valid memory move instruction sequence is inprogress. Consequently, if MIP or V is reset to indicate completion of amemory move instruction sequence, the aborting of a memory moveinstruction sequence, or the invalidity of memory move instructionsequence, the resetting of other variables (e.g., the C flag) isoptional.

The architectural semantics of a copy_first instruction in an embodimentsupporting copy-paste streams including multiple copy-paste pairs can bedescribed in pseudocode as follows:

copy_first if (mip == 1) then   v <- 0; // copy_first received whensequence was already started. else   v <-1; // sequence properly begunby copy_first   mip <- 1 // record that are in the sequence now.   c <-1; // last operation was a copy of some form.   copy data to buffer //copy the data. fi

As can be seen by comparison to the prior pseudocode for a copy_firstinstruction, the only change to the semantics of a copy_firstinstruction to support copy-paste streams is to set the C flag (e.g.,to 1) to indicate that the last operation was a copy of some form if thecopy_first instruction forms part of a legal instruction sequence.

The architectural semantics of a copy instruction in an embodimentsupporting copy-paste streams including multiple copy-paste pairs can bedescribed in pseudocode as follows:

copy if (mip == 1) AND (V=1) AND (C=0) then // All conditions must // bemet for a “copy” to be legal.   c <- 1; // Last operation was some formof copy.   copy data to buffer; // Copy data to buffer. else   v <-0; //Sequence is not valid now.   mip <- 1 // Set MIP in case move wasn't inprogress and // that was the problem.   c <- 0; // fi

According to this pseudocode, processing of a copy instructiondetermines if the copy is legal at this point in the instructionsequence by reference to the MIP, V and C flags. If so, the copyinstruction sets the C flag (e.g., to 1) to indicate that the mostrecently performed operation is a copy and logically copies the datagranule identified by the source address to a buffer. If the copyinstruction is found to be illegal, the V flag is reset to indicate thatthe memory move instruction sequence is invalid. It should be noted thatno copy of data residing at the source address is performed in thiscase, and based on the valid flag being reset, any subsequent pastes inthe memory move instruction sequence also will not be performed. Inaddition, the MIP flag is set (e.g., to 1) to indicate that a memorymove instruction sequence is in process (in case the MIP flag not beingset was the reason the copy instruction was found to be illegal) and theC flag can optionally be reset.

The architectural semantics of a paste_last instruction in an embodimentsupporting copy-paste streams including multiple copy-paste pairs can bedescribed in pseudocode as follows:

paste_last if ((mip == 1) AND (V=1) // Conditions must all be met forAND (C=1)) then // “paste_last” to be legal.   paste data to memory //Perform paste.   from copy buffer;   ensure all copy/paste // Be suresequence is finished.   pairs done;   v <- 0; // Reset flags for nextsequence.   mip <- 0; // Must be in if/then else to be before   c <-0;// return status.   return pass to CR; //. else   v <- 0; // Reset statevariables for next sequence.   mip <- 0; //   c <- 0; //   return failto CR; fi

Processing of the paste_last instruction first checks if the MIP, V andC flags are all set and that the paste_last instruction is thereforelegal. If so, the contents of the buffer are written to memory. Inaddition, after ensuring all copy/paste pairs in the sequence havecompleted, all of the MIP, V and C flags are reset (reset of the C flagis optional), and a pass indication is then returned to the processorcore. If, on the other hand, it is determined that the paste_lastinstruction is not legal because one of the MIP, V and C flags is reset,no data is written to memory. Instead, all of the MIP, V and C flags arereset (reset of the C flag is optional), and a fail indication is thenreturned to the processor core.

The architectural semantics of a paste instruction in an embodimentsupporting copy-paste streams including multiple copy-paste pairs can bedescribed in pseudocode as follows:

paste if ((mip == 1) AND (V=1) AND (C =1)) then // All conditions mustbe // met for “paste” to be legal   paste data to memory from copybuffer; // Perform paste.   c <-0; // Reset of C is optional. else   v<- 0; // Sequence failed. fi

Processing of the paste instruction first checks if the MIP, V and Cflags are all set and that the paste instruction is therefore legal. Ifso, the contents of the buffer are written to memory. In addition, the Cflag may optionally be reset. If, on the other hand, it is determinedthat the paste instruction is not legal because one of the MIP, V and Cflags is reset, no data is written to memory. Instead, the V flag isreset to indicate that the memory move instruction sequence has failed(reporting of the failure is deferred until the paste_last instruction).

The architectural semantics of a cp_abort instruction in an embodimentsupporting copy-paste streams including multiple copy-paste pairs can bedescribed in pseudocode as follows:

cp_abort mip <- 0; //Turn off sequence. v <- 0; // c <- 0; //

As indicated above, the cp_abort instruction resets the MIP, V, and Cflags, where the reset of the V and C flags is optional. In thisembodiment, resetting both of the MIP and V flags causes the contents ofany buffer employed by the copy-paste stream to be abandoned.

It should again be noted that in the embodiment represented by the abovepseudocode, once it is detected that a memory move instruction sequenceis malformed, copy operations and paste operations cease to beperformed. It should be appreciated that this is a design choice thatcan differ in other embodiments. For example, in at least oneembodiment, a copy may be performed for each copy_first or copyinstruction, and/or a paste may be performed for each paste_last orpaste instruction regardless of the detection of a malformed memory moveinstruction sequence.

It should also be appreciated that the memory accesses indicated by thecopy-paste pairs (whether formed of copy_first and paste instructions,copy and paste instructions, or copy and paste_last instructions) in aninstruction stream can be performed concurrently and independently.Consequently, while the memory accesses for any given copy-paste pairoccur in the order of the copy and then the paste, the memory accessesfor different copy-paste pairs can be performed in any order. Cautionshould therefore be taken in constructing copy-paste streams if the setof addresses being copied overlaps with the set of addresses beingpasted, as the result can be non-determinative if not constructedproperly. For example, accesses to overlapping regions of memory can behandled by decomposing a larger memory move into multiple smaller memorymoves in which those contained in each memory move instruction sequencedo not overlap. However, by allowing the copy-paste pairs to proceed inany order, significant tracking and ordering hardware that wouldotherwise be required can be eliminated.

With reference now to FIGS. 14A-14B, there is illustrated a high levellogical flowchart of an exemplary method by memory access requestsinitiated by execution of memory move instructions are serviced by astorage subsystem in accordance with an embodiment supporting copy-pasteinstruction streams. In the following description, it is assumed thatthe illustrated processing is performed by CPD 300 of FIG. 6, whichreceives copy-type and paste-type requests in program sequence from L2STQ 304. It should also be noted that FIGS. 14A-14B represents optionalsteps utilizing blocks shown in dashed line illustration. These stepsare performed only in embodiments in which memory-mapped devices, suchas AS 218 and devices 220 can be targets of memory move instructionsequences in addition to system memories 108. In embodiments in whichonly system memories 108 can be targets of memory move instructionsequences, such steps are omitted.

The process of FIG. 14 begins at block 1400 and then proceeds to block1402, which illustrates CPD 300 resetting (e.g., to 0) MIP flag 606, Vflag 608 and C flag 610. In embodiments in which the target of a memorymove instruction sequence can also be a memory-mapped device (e.g., anAS 218 or a device 220), CPD 300 also resets B flag 612 (block 1403).The process then proceeds to blocks 1404-1409, which illustrate CPD 300monitoring for receipt of any of a copy_first, paste_last, cp_abort,copy or paste request from the associated processor core 200. Inresponse to receipt of a copy_first request at block 1404, CPD 300determines at block 1410 whether or not MIP flag 606 is set (e.g., to1). If so, CPD 300 determines that the instruction sequence is malformedand accordingly resets V flag 608 (block 1412). In embodiments in whichthe target of a memory move instruction sequence can be a memory-mappeddevice, CPD 300 also resets B flag 612 at block 1403. Thereafter, CPD300 resumes monitoring for memory move requests, as indicated by theprocess returning to blocks 1404-1409. In response to CPD 300determining at block 1410 that MIP flag 606 is not set, CPD 300 sets MIPflag 606, V flag 608 and C flag 610 to indicate initiation of a wellformed memory move instruction sequence (block 1414) and places thesource (real) address specified by the copy_first request in copyaddress register 602 (block 1416). In embodiments in which the target ofa memory move instruction sequence can be a memory-mapped device, CPD300 also resets B flag 612 at block 1403. The process then returns toblocks 1404-1409, which have been described.

Referring now to block 1406, in response to receipt of a paste_lastrequest, CPD 300 determines whether any of MIP flag 606, V flag 608 or Cflag is reset (block 1420). If so, the memory move instruction sequenceis malformed. Consequently, CPD 300 returns a CMPLT indication(indicating the end of a memory move instruction sequence) and a failindication (indicating that the memory move instruction sequence failed)to the processor core 200 via buses 334 and 336, respectively (block1424). In response to the CMPLT and fail indications, processor core 200resets E bit 205 (e.g., to 0) to indicate failure of the memory moveinstruction sequence and resets G bit 207 (e.g., to 0) to indicate thata BUSY response from the target of the memory move instruction sequencewas not the cause of failure. In addition, CPD 300 resets MIP flag 606,V flag 608 and C flag 610 (block 1422). In embodiments in which thetarget of a memory move instruction sequence can be a memory-mappeddevice, CPD 300 also resets B flag 612 at block 1403. Thereafter, theprocess returns to block 1404-1409, which have been described.

Returning to block 1420, if a malformed instruction sequence is notdetected, CPD 300 places the destination (real) address specified by thepaste_last request into paste address register 604 (block 1430). CPD 300then waits at block 1431 until all RC/CO machine pairs previouslydispatched to service copy and paste operations of the memory moveinstruction sequence have completed their processing, as indicated, forexample, by done indications 335. Following block 1431, CPD 300 placesin dispatch pipeline 306 a request to dispatch a RC machine 312 and COmachine 310, where the RC machine 312 is for performing a copy of thetarget data granule identified by the source address in the copy addressregister 602 into the corresponding RCDAT buffer 322 and the CO machine310 is for performing the paste of the data granule from the RCDATbuffer 322 to the destination address in memory specified by pasteaddress register 604 (block 1432). As indicated at block 1434, if thedispatch of the matched pair of RC machine 312 and CO machine 310 fails,the process returns to block 1432. If the dispatch from dispatchpipeline 306 is successful, CPD 300 awaits completion of the indicatedcopy and paste operations (block 1436).

As indicated by block 1438, in embodiments in which AS 218 and device(s)220 can serve as targets of memory move instruction sequences, CPD 300determines in response to an affirmative determination at block 1436whether or not B flag 612 has been set (e.g., to 1) to indicate that amemory-mapped device, such as an AS 218 or device 220, could not processthe memory move data. If not, or in cases in which the memory moveinstruction sequence targets a real address in system memory 108 ratherthan a memory-mapped device (in which case B flag is never set), theprocess proceeds to block 1440. However, in response to a determinationthat B flag was set during the memory move instruction sequence, theprocess instead proceeds to block 1439, which illustrates CPD 300returning a CMPLT indication and busy indication to processor core 200via buses 334 and 336, respectively. In response to the CMPLT and busyindications, processor core 200 resets E bit 205 (e.g., to 0) toindicate failure of the memory move instruction sequence and sets G bit207 (e.g., to 1) to indicate the cause of failure was a BUSY responsefrom the target of the memory move instruction sequence. Thereafter, theprocess passes to block 1422 and following blocks, which have beendescribed.

Block 1440 depicts CPD 300 returning a CMPLT indication (indicating theend of a memory move instruction sequence) and a pass indication(indicating that the memory move instruction sequence passed) to theprocessor core 200 via buses 334 and 336, respectively. Thereafter, theprocess returns to block 1422 and following blocks, which have beendescribed.

Referring now to block 1408, in response to receipt by CPD 300 of acp_abort request, CPD 300 resets MIP flag 606, V flag 608 and C flag 610(block 1450). In embodiments in which a real address in a system memory108 is the target of the memory move instruction sequence, the processthen returns to blocks 1404-1409, which have been described. Inembodiments in which the target of the memory move instruction sequencecan be a memory-mapped device, such as an AS 218 or a device 220, CPD300 performs the additional steps illustrated at blocks 1452-1456. Atblock 1452, CPD 300 resets B flag 612 (e.g., to 0). At block 1454, CPD300 additionally broadcasts a cp_abort request on the interconnectfabric to inform the target memory-mapped device that the memory movehas been aborted. CPD 300 then monitors at block 1456 for a “done”response (e.g., on the interconnect fabric) from the targetmemory-mapped device indicating that the target memory-mapped device hascompleted its processing of paste requests within the memory move. Inresponse to receipt of such a “done” response, the process returns toblocks 1404-1409.

With reference now to block 1407, in response to receipt by CPD 300 of acopy request, the process passes through page connector A to block 1460of FIG. 14B, which illustrates CPD 300 determining whether the copyinstruction is legal, that is, whether MIP flag 606 and V flag 608 areset and C flag 610 is reset. If not, CPD 300 resets MIP flag 606, V flag608 and C flag 610 (block 1462). In embodiments in which a memory-mappeddevice can be the target of the memory move, CPD also resets B flag 612(block 1464). Following block 1462 or, if performed, block 1464, theprocess returns through page connector C to blocks 1404-1409 of FIG.14A. Referring again to block 1460, if the copy instruction is legal,CPD 300 sets C flag 610 (block 1466) and places the source real addressspecified by the copy request into copy address register 602 (block1468). Thereafter, the process returns via page connector C to blocks1404-1409, which have been described.

Referring now to block 1409, in response to receipt by CPD 300 of apaste request, the process passes through page connector B to block 1470of FIG. 14B, which illustrates CPD 300 determining whether the pasteinstruction is legal, that is, whether MIP flag 606, V flag 608 and Cflag 610 are all set. If not, CPD 300 resets V flag 608 and C flag 610(block 1472). In embodiments in which a memory-mapped device can be thetarget of the memory move, CPD also resets B flag 612 (block 1473).Following block 1472 or, if performed, block 1473, the process returnsthrough page connector C to blocks 1404-1409, which have been described.

Returning to block 1470, in response to CPD 300 determining that thepaste instruction is legal, CPD 300 loads the destination real addressspecified by the paste request into paste address register 604 (block1474). In addition, CPD 300 places in dispatch pipeline 306 a request todispatch a RC machine 312 and CO machine 310, where the RC machine 312is for performing a copy of the target data granule identified by thesource address in the copy address register 602 into the correspondingRCDAT buffer 322 and the CO machine 310 is for performing the paste ofthe data granule from the RCDAT buffer 322 to the destination address inmemory specified by paste address register 604 (block 1476). Asindicated at block 1478, if the dispatch of the matched pair of RCmachine 312 and CO machine 310 fails, the process returns to block 1476.If the dispatch from dispatch pipeline 306 is successful, CPD 300 resetsC flag 310 (block 1482). Thereafter, the process returns through pageconnector C to blocks 1404-1409, which have been described.

With reference now to FIGS. 15A-15B, there is illustrated a high levellogical flowchart of an exemplary method by which a processor corehandles memory access requests initiated by execution of memory moveinstructions in accordance with another embodiment supporting copy-pasteinstruction streams. In the following description, it is assumed thatthe illustrated processing is performed in processor core 200 by controllogic 812 of FIG. 8. It should also be noted that FIGS. 15A-15Brepresents optional steps utilizing blocks shown in dashed lineillustration. These steps are performed only in embodiments in whichmemory-mapped devices, such as AS 218 and devices 220 can be targets ofmemory move instruction sequences in addition to system memories 108. Inembodiments in which only system memories 108 can be targets of memorymove instruction sequences, such steps are omitted.

The process of FIG. 15A begins at block 1500 and then proceeds to block1502, which illustrates control logic 812 resetting (e.g., to 0) MIPflag 822, V flag 824 and C flag 826. In embodiments in which the targetof a memory move instruction sequence can also be a memory-mapped device(e.g., an AS 218 or a device 220), control logic 812 also resets B flag828 (block 1503). The process then proceeds to blocks 1504-1509 (ofwhich block 1507 and 1509 are illustrated in FIG. 15B), which illustratecontrol logic 812 monitoring for receipt from ISU 202 of any ofcopy_first, paste_last, cp_abort, copy and paste instructions. Inresponse to receipt of a copy_first instruction at block 1504, controllogic 812 determines at block 1510 whether or not MIP flag 822 is set(e.g., to 1). If so, control logic 812 determines that the instructionsequence is malformed (illegal) and accordingly resets V flag 824 and Cflag 826 (block 1512). In embodiments in which the target of a memorymove instruction sequence can be a memory-mapped device, CPD 300 alsoresets B flag 828 at block 1503. Thereafter, control logic 812 resumesmonitoring for memory move instructions, as indicated by the processreturning to blocks 1504-1509. In response to control logic 812determining at block 1510 that MIP flag 822 is not set, control logic812 sets MIP flag 822, V flag 824 and C flag 826 to indicate initiationof a well formed memory move instruction sequence (block 1514) andtransmits a copy_first request containing the source (real) address tothe associated L2 cache 230 (block 1516). In embodiments supporting themigration of memory move instruction sequences between hardware threads,control logic 812 also load the source address into RA register 830(see, FIG. 8) at block 1516. The process then returns, if necessary, toblock 1503 and then to blocks 1504-1509, which have been described.

Referring now to block 1506, in response to receipt by control logic 812of a copy request, control logic 812 determines whether the copyinstruction is legal, that is, whether MIP flag 822 and V flag 824 areset and C flag 826 is reset (block 1520). If not, control logic 812 setsMIP flag 822 (block 1522) and resets V flag 824 and C flag 826 (block1512). MIP flag 822 is set at this point in case the copy instructionwas illegal because the copy instruction was the first instruction inthe memory move instruction sequence executed in the current context ofthe current hardware thread (e.g., as would be the case following acontext switch). In embodiments in which the target of a memory moveinstruction sequence can also be a memory-mapped device (e.g., AS 218 ordevice 220), control logic 812 also resets B flag 828 (block 1503). Theprocess then returns to blocks 1504-1509. Referring again to block 1520,in response to a determination that the copy instruction is legal,control logic 812 sets C flag 826 (block 1530) and transmits the source(real) address determined for the copy instruction to the associated L2cache 230 in a copy request (block 1532). In embodiments supporting themigration of memory move instruction sequences between hardware threads,control logic 812 also load the source address into RA register 830(see, FIG. 8) at block 1532. Thereafter, the process returns to blocks1504-1509, which have been described.

Referring now to block 1508, in response to receipt by control logic 812of a cp_abort instruction, control logic 812 transmits a cp_abortrequest to the associated L2 cache 230 to request a CMPLT indicationwhen all previously dispatched memory move requests in the currentcopy-paste stream have been completed (block 1540). Control logic 812then awaits receipt from the L2 cache 230 via bus 334 of a CMPLTindication indicating that all previously dispatched memory moverequests in the current copy-paste stream have been completed (block1542). In response to receipt of the CMPLT indication, control logic 812resets V flag 824 and C flag 826 (block 1544). In embodiments in whichthe target of a memory move instruction sequence can also be amemory-mapped device (e.g., AS 218 or device 220), control logic 812also resets B flag 828 (block 1546). Following block 1544 or, ifperformed, block 1546, the process returns to blocks 1504-1509, whichhave been described.

With reference to block 1507 of FIG. 15B, in response to detection of apaste_last instruction, the process proceeds to block 1560, whichillustrates control logic 812 determining whether the paste_lastinstruction is legal, for example, by determining if MIP flag 822, Vflag 824, and C flag 826 are all set. If not, the memory moveinstruction sequence is malformed. Consequently, control logic 812resets E bit 205 to indicate failure of the memory move instructionsequence (block 1561) and, in embodiments in which a memory-mappeddevice can be the target of a memory move instruction sequence, alsoresets G bit 207 to indicate that the cause of failure was not a BUSYresponse from the target (block 1562). Control logic 812 also resets MIPflag 822, V flag 824 and C flag 826 (block 1564) and, if necessary, alsoresets B flag 828 (block 1565). Following block 1564 or, if implemented,block 1565, the process returns through page connector E to blocks1504-1509, which have been described.

Referring again to block 1560, in response to control logic 812determining that the paste_last instruction is legal, control logic 812determines at block 1566 whether or not all RC/CO pairs allocated toservice prior memory accesses in the memory move instruction sequencehave completed their operations, for example, based on done indications335. In response to a determination at block 1566 that all pendingmemory accesses in the memory move instruction sequence have completed,control logic 812 transmits a paste_last request specifying thedestination real address of the paste_last instruction to L2 cache 230(block 1570). Control logic 812 then awaits receipt of a CMPLTindication from the associated L2 cache 230 indicating that theindicated paste operation is complete (block 1576). In embodiments inwhich the target of a memory move instruction sequence can be amemory-mapped device, control logic 812 determines at block 1578 whetheror not B flag 828 is set to indicate receipt of a BUSY response from amemory-mapped device that is the target of the present memory moveinstruction sequence. If so, control logic 812 resets E bit 205 (e.g.,to 0) to indicate failure of the memory move instruction sequence andsets G bit 207 (e.g., to 1) to indicate the cause of failure as a BUSYresponse from the target memory-mapped device (block 1579). Thereafter,the process passes to block 1564, which has been described. However, inresponse to a determination at block 1578 that B flag 828 is reset or ifblock 1578 is omitted, control logic 812 sets E flag 205 (e.g., to 1) toindicate success of the memory move instruction sequence (block 1580).In embodiments in which the target of the memory move instructionsequence is permitted to be a memory-mapped device (e.g., AS 218 ordevice 220), control logic 812 also resets G bit 207 (e.g., to 0) toindicate that no BUSY response was received (block 1581). Thereafter,the process passes to block 1564 and following blocks, which have beendescribed.

Referring now to block 1509, in response to receipt by control logic 812of a paste instruction, control logic 812 determines at block 1590whether the paste instruction is legal, that is, whether MIP flag 822, Vflag 824 and C flag 826 are all set. If not, control logic 812 set MIPflag 822 and resets V flag 824 and C flag 826 (block 1592). MIP flag 822is set at this point in case the paste instruction was illegal becausethe paste instruction was the first instruction in the memory moveinstruction sequence executed in the current context of the currenthardware thread (e.g., as would be the case following a context switch).In addition, in embodiments in which the target of the memory moveinstruction sequence can be a memory-mapped device, control logic 812resets B flag 828 (block 1593). Following block 1592 or, if performed,block 1593, the process returns through page connector E to blocks1504-1509, which have been described. If, however, control logic 812determines at block 1590 that the paste instruction is legal, controllogic 812 transmits the destination (real) address determined for thepaste request to the associated L2 cache 230 in a paste request (block1594). Thereafter, the process returns through page connector E toblocks 1504-1509, which have been described.

Referring now to FIG. 16 is a high level logical flowchart of anexemplary method by which a store-in lower level cache memory handlesmemory access requests initiated by execution of memory moveinstructions in accordance with an embodiment supporting copy-pasteinstruction streams. In the following, the operations shown in FIG. 16are described as being performed by control logic 810 of CPD 800, whichreceives copy-type and paste-type requests from L2 STQ 304 in programsequence. As with the preceding flowcharts, FIG. 16 represents optionalsteps utilizing blocks shown in dashed line illustration. These stepsare performed only in embodiments in which memory-mapped devices, suchas AS 218 and devices 220 can be targets of memory move instructionsequences in addition to system memories 108. In embodiments in whichonly system memories 108 can be targets of memory move instructionsequences, such steps are omitted.

The process begins at block 1600 and then proceeds to blocks 1602, whichillustrates control logic 810 monitoring for receipt of either acopy_first or copy request from the associated processor core 200, asdiscussed above with reference to blocks 1516 and 1532 of FIG. 15A. Inresponse to receipt of a copy_first or copy request, control logic 810places the source (real) address specified by the copy_first or copyrequest into copy address register 802 (block 1604). The process thenpasses from block 1604 to block 1606.

Block 1606 illustrates control logic 810 monitoring for receipt of acp_abort request from the associated processor core 200, as discussedabove with respect to block 1540 of FIG. 15A. If no cp_abort request isdetected, the process proceeds to block 1610, which is described below.However, in response to receipt of a cp_abort request, control logic 810determines at block 1605 whether or not all RC machines 312 and all COmachines 310 dispatched to service memory move requests in the presentcopy-paste stream have been retired (e.g., a done signal 335 has beenreceived for each such RC-CO machine pair). If not, the process iteratesat block 1605. Once all RC-CO machine pair(s) allocated to servicememory move requests in the copy-paste stream have been retired, theprocess proceeds directly to block 1609 in embodiments in which thetarget of a memory move instruction sequence is restricted to a realaddress in system memory 108. In other embodiments in which the targetof a memory move instruction sequence can be and is a memory-mappeddevice, the process first passes to block 1607-1608. At block 1607,control logic 810 broadcasts a cp_abort request on the interconnectfabric to inform the target memory-mapped device that that memory movehas been aborted. Control logic 810 then awaits receipt of a “done”response confirming completion of processing of all paste requests bythe target memory-mapped device (block 1608). In response to receipt ofthe “done” response, the process then proceeds from block 1608 to block1609. Block 1609 depicts control logic 810 returning a CMPLT indicationto the processor core 200 via bus 334. The process then proceeds toblock 1610.

Block 1610 illustrates control logic 810 determining whether or not apaste_last or paste request has been received, as discussed above withrespect to blocks 1570 and 1594 of FIG. 15B. If not, the process of FIG.16 returns to block 1602. In response to a determination at block 1610that a paste_last or paste request has been received, control logic 810places the destination real address specified by the paste_last or pasterequest into paste address register 804 (block 1612). In addition,control logic 810 places into dispatch pipeline 306 of L2 cache 230 arequest to dispatch a RC machine 312 and CO machine 310, where the RCmachine 312 is for performing a copy of the target data granuleidentified by the source real address in the copy address register 802into the corresponding RCDAT buffer 322 and the CO machine 310 is forperforming the paste of the data granule from the RCDAT buffer 322 tothe memory location identified by the destination real address in pasteaddress register 804 (block 1614). As indicated at block 1616, if thedispatch of the matched pair of RC machine 312 and CO machine 310 fails,the process returns to block 1614. If the dispatch from dispatchpipeline 306 is successful, the process then returns to block 1602 ifthe request received at block 1610 was a paste request (block 1617). If,however, the request was a paste_last request, the process proceeds fromblock 1617 to block 1618, which illustrates control logic 810 waitinguntil the memory access operations initiated by the current paste_lastrequest and its associated copy or copy_first request have completed, asindicated, for example, by done signals 335. Once all such memory accessoperations are complete, control logic 810 returns a CMPLT indication(indicating the end of a memory move instruction sequence) to theprocessor core 200 via bus 334 as discussed above with reference toblock 1576 of FIG. 15B (block 1620). Thereafter, the process returns toblock 1602, which has been described.

The present disclosure also appreciates that in at least someembodiments it is desirable to be able to suspend and resume a memorymove instruction sequence, for example, when a memory move instructionsequence is transferred between threads on a context switch. In at leastone embodiments, this additional capability is facilitated throughimplementation of an additional copy_pending instruction as illustratedin FIG. 17.

In the embodiment of FIG. 17, copy_pending instruction 1700, which isexecutable by an execution unit of processor core 200, such as LSU 206a, includes an opcode field 1702 specifying an operation code signifyinga copy_pending instruction. In addition, copy_pending instruction 1700includes an operand field 1704 that specifies an architected register(e.g., rB) for storing the source real address of a copy operation. Acopy_pending instruction determines if a valid memory move instructionsequence is in process and if the immediately previous operation of sucha memory move instruction sequence was a copy-type operation and, if so,places the source real address of the copy-type operation in a specifiedregister of the processor core.

The architectural semantics of the copy_pending instruction can bedescribed with the following pseudocode:

copy_pending E<- 0; // Reset E bit in condition register. if (mip ==1AND V==1 // Valid move in process and immediately AND C ==1) then//previous operation was a copy. rB <- RA; // Place RA of copy operationin register rB E <-1; // Set condition register bit. fi

In this embodiment, processing of the copy_pending instruction 1700begins by resetting (e.g., to 0) a selected bit of a condition register(CR) 204 in processor core 200, such as equal (E) bit 205 (see, e.g.,FIG. 2). The state of the E bit 205 indicates whether a copy operationinitiated by a copy_first or copy instruction was the most recentoperation performed in a currently valid memory move instructionsequence. Next, processing of the copy_pending instruction 1700determines whether a valid memory move instruction sequence is inprocess and if the most recently performed operation in such a memorymove instruction sequence is a copy operation initiated, for example, bya copy_first or copy instruction. If not, processing of the copy_pendinginstruction ends. However, if a valid memory move instruction sequenceis in process and the most recently performed operation in such a memorymove instruction sequence is a copy operation, the real address (RA) ofthe most recently performed copy operation, which is buffered, forexample, in RA register 830 of processor core 200, is transferred to aarchitected register rB specified in operand field 1704 of thecopy_pending instruction 1700. In addition, E bit 205 is set to indicatethat the copy_pending instruction set an source real address in registerrB. Thereafter, processing of the copy_pending instruction 1700 ends.

With reference now to FIG. 18, there is depicted a saved register area(SRA) 1800 in memory in accordance with one embodiment. SRA 1800, whichcan be utilized to buffer the state of a hardware thread during acontext switch, includes storage for the various architected registersets of the processor core 200. For example, in this example in whichprocessor core 200 includes general purpose registers (GPRs),floating-point registers (FPRs), vector registers (VRs) and machinecondition registers (MCRs), SRA 1800 includes a GPR storage area 1802, aFPR storage area 1804, a VR storage area 1806, and a MCR storage area1806. As indicated, MCR storage area 1806 includes storage for machinestate registers (MSRs) in a MSR storage area 1808. SRA 1800 additionallyincludes a flag 1810 indicating whether or not SRA 1800 currently holdsthe state of a suspended memory move instruction sequence and a EAstorage area 1812 storing a copy of the source effective address in RAregister 830. As will be appreciated, for data processing systemsincluding processor cores 200 capable of SMT, a separate SRA 1800 may beallocated in memory for each of the hardware threads of each ofprocessor cores 200.

Referring now to FIG. 19, there is depicted a high level logicalflowchart of an exemplary method by which a memory move instructionsequence is suspended in accordance with one embodiment. The process ofFIG. 19 begins at block 1900 and then proceeds to block 1902, whichillustrates a processor core 200 saving the contents of the architectedregisters for the hardware thread executing the memory move instructionsequence in the appropriate SRA 1800 in memory. Thus, the processor core200 saves the contents of its architected registers in storage area1802-1808. At block 1904, a processing unit 206 (e.g., LSU 206 a)additionally executes a copy_pending instruction. As indicated at block1906, processor core 200 then tests E bit 205 to determine if thecopy_pending operation set a source real address of a copy-type requestin a register rB. If not, the process proceeds to block 1910, whichillustrates processor core 200 resetting (e.g., to 0) flag 1810 in SRA1800, signifying that no copy operation was pending. Thereafter,processor core 200 executes a cp_abort instruction to conclude allpending memory move operations, if any, in the storage subsystem (block1912). Thereafter, the process of FIG. 19 ends at block 1914.

Returning to block 1906, in response to the processor core 200determining that the copy_pending instruction set a source real addressof a copy-type request in register rB, processor core 200 sets flag 1810in SRA 1800 to indicate that a copy is pending in the memory moveinstruction sequence and stores the source real address contained inregister rB into RA storage area 1812 (block 1908). Thereafter, theprocess of FIG. 19 passes to block 1912 and 1914, which have beendescribed.

With reference now to FIG. 20, there is illustrated a high level logicalflowchart of an exemplary method by which a memory move instructionsequence is resumed in accordance with one embodiment. The process ofFIG. 20 begins at block 2000 and then proceeds to optional block 2002,which illustrates a hardware thread resuming execution of a memory moveinstruction sequence, for example, following a context switch, byexecuting of a cp_abort instruction that resets the memory move statevariables (i.e., MIP flag 822, V flag 824 and C flag 826) of thehardware thread. Next, at block 2004, the processor core 200 restoresthe MCRs 1806, including the MSR 1808, of the hardware thread from SRA1800. At block 2006, the processor core 200 tests whether flag 1810 isset in SRA 1800 to indicate that a memory move instruction sequence wasin process and was suspended immediately after an unmatched copyoperation. (In general, this test modifies the value of CR 204 loaded atblock 2004.) If not, the process passes to block 2010 and followingblocks, which are described below. If, however, processor core 200determines at block 2006 that flag 1810 is set, the processor core 200executes a privileged copy_OS instruction to send the source addressbuffered in RA storage area 1812 to the associated L2 cache 230 in acopy request so that CPD 300 loads the source real address into copyaddress register 602. The process then proceeds to block 2010.

Block 2010 depicts processor core 200 restoring the contents of theother architected registers (e.g., GPRs, FPRs, VRs) from SRA 1800 to thearchitected registers in processor core 200. In addition, processor core200 again restores the value of CR 204 from MCRs 1806 to restore thevalue of the bit corrupted by the test performed at block 2006.Processor core 200 then resumes execution of the memory move instructionsequence on the hardware thread (block 2012). The process of FIG. 20thereafter ends at block 2014.

With reference to FIG. 21, there is illustrated a high level logicalflowchart of an exemplary method by which a lower level cache memoryservices memory access requests in accordance with one embodiment.Although the operations are described below with respect to an RCmachine 312 and a CO machine 310 as depicted in FIG. 3, it should berecalled that in some embodiments, the operations may instead beperformed within CPE 332 of FIG. 11 by a cp_RC machine 1100 and cp_COmachine 1102 utilizing cp_RCDAT buffer 1104.

The process of FIG. 21 begins at block 2100, for example, in response todispatch of a RC machine 312 and a CO machine 310 to perform a copy-typeoperation and a paste-type operation, respectively. The process of FIG.21 proceeds from block 2100 to block 2102, which illustrates the RCmachine 312 dispatched to service the copy-type operation by reading asource data granule from the source real address specified in copyaddress register 602 or 802. If the source data granule resides in thelocal cache array 302 (e.g., as indicated by the coherence statereturned by the access to directory 308), the RC machine 312 simplycauses the target data granule to be transferred from cache array 302 tothe RCDAT buffer 322 of the RC machine 312. If the target data granuledoes not reside in local cache array 302, RC machine 312 issues arequest for the target data granule on the interconnect fabric. Whenreturned via the interconnect fabric, the data granule is transmitted tothe relevant RCDAT buffer 322 via reload bus 323.

Next, at block 2104, the allocated CO machine 310 writes the datagranule to the destination real address specified in paste addressregister 604 or 804. In particular, the CO machine 310 issues on theinterconnect fabric an appropriate paste-type (e.g., paste orpaste_last) request that specifies the destination real addressspecified in paste address register 604 or 804 and that has anassociated data tenure in which CO machine 310 transmits the datagranule contained in the relevant RCDAT buffer 322. If the target of thepaste-type request is a real address in a system memory 108, the requeston the interconnect fabric will be snooped and serviced by the memorycontroller 106 of the system memory 108 containing the storage locationidentified by the destination real address. In this case, or in cases inwhich the target memory-mapped device provides a RETRY response ratherthan a BUSY response when the memory-mapped device is unable to handlerequests, the process then passes directly from block 2104 to block2110, at which the process ends and the RC machine 312 and CO machine310 are deallocated. In cases in which the target of the memory move isa memory-mapped device, such as an AS 218 or device 220, the processinstead proceeds from block 2104 to block 2106, which illustrates CPD300 or control logic 812 (depending on whether the embodiment of FIG. 6or FIG. 8 is employed) determining whether or not the targetmemory-mapped device provided a BUSY response to paste-type request viathe interconnect fabric. If not, the process passes to block 2110, whichhas been described. If, however, the device provided a BUSY response,CPD 300 or control logic 812 sets B flag 612 or 828 to record the BUSYresponse (block 2108). Thereafter, the process of FIG. 21 ends at block2110.

Referring now to FIG. 22, there is depicted a high level logicalflowchart of an exemplary method by which program code (e.g.,application, operating system, driver, firmware, hypervisor or acombination of one or more of these or other types of software) handlesa device busy condition in accordance with one embodiment. The processof FIG. 22 begins at block 2200 and then proceeds to block 2202, whichillustrates program code executing a memory move instruction sequence inone or more hardware threads as discussed in detail with reference tothe above-described embodiments. In this case, the memory moveinstruction sequence targets a memory-mapped device, such as an AS 218or device 200.

In some implementations, one or more of the memory-mapped devices thatmay be targeted by memory moves are configured to provide a RETRYresponse to any paste-type request targeting the memory-mapped devicethat it snoops on the interconnect fabric and is unable to immediatelyservice. In some implementations, one or more memory-mapped devices mayadditionally be configured to provide a BUSY response to those requeststargeting the memory-mapped device that it snoops on the interconnectfabric and will be unable to service, for example, for at least apredetermined period of time. The BUSY response can thus be utilized toprovide additional depth of information, which can be utilized byprogram code to intelligently control program flow.

The process then proceeds to block 2204, which illustrates the softwaredetermining whether or not the target memory-mapped device is busy, forexample, by executing one or more instructions that read CR 204 andtests whether G bit 207 is set. In response to a determination at block2204 that the target memory-mapped device is not busy, the softwarecontinues its current flow of execution, and process of FIG. 22 ends atblock 2210. If, however, a determination is made at block 2204 that thetarget memory-mapped device is busy, the process passes to block 2206.

Block 2206 illustrates the program code determining whether or notalternative fallback processing in lieu of the requested memory move isavailable and determining whether or not to perform the alternativeprocessing. For example, the program code may make the determination atblock 2206 based on how many times and/or for how long the targetmemory-mapped device has been busy and/or the duration of thealternative processing. In response to a determination at block 2206 notto perform fallback processing, the program code repeats the memory moveinstruction sequence, as represented by the process returning to block2202. If, on the other hand, the program code determines at block 2206to perform the fallback processing, the program code abandons the memorymove instruction sequence and performs alternative processing, as shownat block 2208. As but one example, if the memory-mapped device is ahardware encryption accelerator that encrypts data granules delivered bymemory move instruction sequences, the alternative processing performedat block 2208 can be performing software encryption of the datagranules. Thus, in some cases, the alternative processing performed atblock 2208 can implement in program code the same or similar operationthat was intended to be performed in hardware on or utilizing the datadelivered by the memory move. In other cases, the alternative processingmay be a different operation than that which was intended to beperformed in hardware. Following block 2208, the process of FIG. 22 endsat block 2210.

With reference now to FIG. 23, there is illustrated an exemplaryembodiment of a memory-mapped device 2300 in accordance with oneembodiment. In various embodiments, memory-mapped device 2300 may beutilized to implement an AS 218 or device 220 of FIG. 2.

In the illustrated embodiment, memory-mapped device 2300 includes one ormore request decoders 2301 that receive and decode requests received onthe interconnect fabric. In this example, each request decoder 2301 isassigned (e.g., by firmware or by operating system or hypervisorsoftware) a range of one or more real addresses for which that requestdecoder 2301 is responsible and at which that request decoder 2301receives memory move data transmitted in conjunction with paste-type(e.g., paste and paste_last) requests. Each request decoder 2301 has anassociated set of one or more buffers 2302, each of which has thecapacity to buffer one or more data granules in one or more buffersegments 2303. Each buffer 2302 in turn has associated metadata storage2304, which in the illustrated embodiment includes a buffer valid flag2306 indicating whether the associated buffer 2302 contains at least onevalid data granule, a source tag field 2308 for storing a source tagindicating a source of the memory move data buffered in the associatedbuffer 2302, and a data valid field 2310 including one bit per buffersegment 2303 of the associated buffer 2302. In one embodiment, thesource tag specified in source tag field 2308 can be the hardware threadidentifier (TID) of the source hardware thread. In this case,memory-mapped device 2300 abandons a memory move on a context switchsignaled by a cp_abort request. In other embodiments, memory-mappeddevice 2300 is instead configured to permit memory moves to survivecontext switches. In this case, the source tag specified in source tagfield 2308 is of a greater length and includes additional sourceidentifying information that will survive the context switch, such asthe logical partition identifier (LPID), process identifier (PID) andsoftware thread identifier (TID).

Buffer(s) 2302 are further coupled to one or more processing engines2320 for digesting memory move data and performing one or moreoperations on and/or with the memory move data. Exemplary operation ofmemory-mapped device 220 is described below with reference to FIGS.24-25. In one exemplary embodiment described with respect to FIG. 25 inwhich memory-mapped device 2300 implements an AS 218, processing engine2320 may include storage for control information, such as write pointerstorage 2322 and read pointer storage 2324 for storing the realaddresses of a write pointer and read pointer storage 2324,respectively. The control information may also include otherinformation, such as the base real address and size of the memory queue.

Referring now to FIG. 24, there is depicted a high level logicalflowchart of an exemplary method by which a memory-mapped device 2300processes memory move requests received on the interconnect fabric of adata processing system 100 in accordance with one embodiment. Theprocess begins at block 2400, for example, in response to a requestdecoder 2301 of a memory-mapped device 2300 receiving on theinterconnect fabric of data processing system 100 a request thatspecifies a target real address for which the request decoder 2300 isassigned responsibility. As indicated at blocks 2402-2404, in responseto receipt of such a request, the request decoder 2301 determines thetype of the request, that is, whether the request is a paste-type (e.g.,paste or paste_last) request (block 2402) or a cp_abort request (block2404). If the received request is neither a paste-type request nor acp_abort request, the request decoder 2301 discards the request, and theprocess returns to blocks 2402-2404. In embodiments of memory-mappeddevice 2300 configured to permit memory moves to survive a contextswitch, request decoder 2301 also discards cp_abort requests at block2404. In other embodiments in which memory-mapped device 2300 is notconfigured to permit memory moves to survive a context switch, requestdecoder 2301, in response to receipt of a cp_abort request at block2404, further determines at block 2406 whether or not the memory move towhich the cp_abort request belongs has been allocated one of itsassociated buffers 2302. The request decoder 2301 can make thedetermination shown at block 2406, for example, by determining whetheror not the source tag specified in the cp_abort request matches thecontents of any of its associated source tag fields 2308 for which validflag 2306 is set (e.g., to 1) to indicate a valid entry. If not, theprocess returns to blocks 2402-2404. If, however, request decoder 2301determines at block 2406 that the memory move identified by the cp_abortrequest is currently allocated a buffer 2302, request decoder 2301resets (e.g., to 0) the associated valid flag 2306 and data valid field2310 to discontinue handling of (i.e., abort) the memory move by thememory-mapped device 2300. Thereafter, the process returns to blocks2402-2404, which have been described.

Referring again to block 2402, in response to request decoder 2301determining that the received request is a paste-type request (e.g., apaste or paste_last request), request decoder 2301 determines at block2410 whether or not the memory move to which the paste-type requestbelongs is currently allocated one of its associated buffers 2302. Asdescribed above with reference to block 2406, request decoder 2301 canmake the determination shown at block 2410, for example, by determiningwhether or not the source tag specified in the paste-type requestmatches the contents of any of its associated tag fields 2308 for whichthe associated valid flag 2306 is set to indicate a valid entry. If so,the process passes directly to block 2420, which is described below. Ifnot, request decoder 2301 determines at block 2412 if one of itsassociated buffers 2302 is available for allocation to a new memorymove, for example, by determining if any of the associated valid flags2306 are reset (e.g., to 0). In response to a determining at block 2412that no buffer 2302 is currently available for allocation (i.e., thatall of the associated buffers 2302 are presently allocated to othermemory moves), request decoder 2301 provides a BUSY response to thepaste-type request in the depicted embodiment (block 2414). As notedabove, in some embodiments, request decoder 2301 may alternativelyprovide a RETRY response instead of a BUSY response at block 2414.Further, in some embodiments, request decoder 2301 may provide a BUSYresponse to a paste-type request of a memory move at block 2414 onlyafter providing one or more RETRY responses. In the case in whichmemory-mapped devices only provide RETRY responses, the heretoforedescribed logic and processing steps supporting handling of BUSYresponses can be omitted. Following block 2414, the process of FIG. 24returns to blocks 2402-2404, which have been described. However, inresponse to determining at block 2412 that a buffer 2302 is availablefor allocation to the new memory move, request decoder 2301 allocatesone of its unallocated buffers 2302 to the memory move (block 2416) andloads the source tag specified in the paste-type request into theassociated source tag field 2308 and sets the associated valid flag 2306(block 2418). In addition, as shown at block 2420, request decoder 2301places the data granule received in association with the paste-typerequest into a buffer segment 2303 and sets the associated data validbit in data valid field 2310.

As indicated by block 2422, if the paste-type request received at block2402 is a paste request rather than a paste-last request, the processthen returns to blocks 2402-2404. However, if the paste-type request isa paste_last request signifying the end of a memory move, requestdecoder 2301 also determines at block 2424 whether or not all data validbits have been set. If not, meaning that one or more paste requests ofthe memory move have not been received, request decoder 2301 recognizesthat the memory move has failed and accordingly resets the associatedvalid field 2306 and data valid field 2310 associated with the buffer2302 allocated to the memory move (block 2408). Following block 2408,the process returns to blocks 2402-2404, which have been described. If,however, request decoder 2301 determines at block 2424 that all of thebits of the associated data valid field 2310 are set, meaning that alldata granules of the memory move have been received and buffered bydevice 2300, request decoder 2301 issues to the appropriate processingengine 2320 all of the data granules held in the buffer 2302 allocatedto the memory move. Thereafter, the process passes to block 2408 andfollowing blocks, which have been described.

With reference now to FIG. 25, there is illustrated a high level logicalflowchart of an exemplary method by which an AS 218 processes themessage delivered by a memory move in accordance with one embodiment.The illustrated process assumes implementation of the AS 218 by amemory-mapped device 2300 as illustrated in FIG. 23.

The process of FIG. 25 begins at block 2500, for example, in response toa processing engine 2320 of the AS 218 being issued the data from abuffer 2302 at block 2426 of FIG. 24. The process of FIG. 25 proceedsfrom block 2500 to block 2502, which illustrates the processing engine2320 storing the data received from the buffer 2302 into a queue in asystem memory 108 using the target real address indicated by the writepointer identified by write pointer storage 2322. In general, storingthe data includes issuing a write operation on the interconnect fabricdirected to the memory controller 106 associated with the target systemmemory 108. If the queue is full when block 2502 is initiated, thenprocessing engine 2320 simply waits for the queue to be non-full priorto performing the store operation shown at block 2502.

FIG. 26 depicts an exemplary write queue 2600 in system memory 108 inaccordance with one embodiment. In this example, write queue 2600includes one or more queue entries 2602. In one preferred embodiment,each queue entry 2602 has a length equal to that of a buffer 2302. Inother embodiments, each queue entry 2602 has a length equal to that of Nbuffers 2302, where N is a positive integer that is 2 or greater. Awrite pointer 2604 identifies the next address at which data is to bewritten into queue 2600, and a read pointer 2606 identifies the nextaddress from which data is to be read from queue 2600.

Returning to FIG. 25, in conjunction with the write to the queue 2600 atblock 2502, processing engine 2320 also updates write pointer 2604 toindicate a next available location in queue 2600 (block 2504). In someembodiments, the process of FIG. 25 thereafter ends at block 2510. Inother embodiments in which AS 218 is configurable to notify a targetdevice of the availability of new data within queue 2600, the processinstead passes to block 2506, which illustrates processing engine 2320implicitly or explicitly determining whether it is presently configuredto provide notification to a target device of the availability of newdata in queue 2600. If so, processing engine 2320 transmits an AS_notifymessage to the target device (e.g., one of devices 220), for example,via the interconnect fabric 110, 114 (block 2508). Following block 2508or following a negative determination at block 2506, the process of FIG.25 ends at block 2510.

With reference now to FIG. 27, there is illustrated a high level logicalflowchart of an exemplary method by which a device ingests data queuedby an AS in accordance with one embodiment. The process of FIG. 27begins at block 2700 and then proceeds to block 2702, which illustratesa device 220 monitoring to detect receipt of an AS_notify message froman AS 218. If no AS_notify message is received at block 2702, the device220 may optionally further poll to determine whether or not a new datahas been written into its queue 2600 in memory (e.g., by determining ifwrite pointer 2604 has been updated). In response to negativedeterminations at block 2702 and, if implemented, block 2704, theprocess continues to iterate at block 2702.

In response to a determination at either block 2702 or block 2704 thatnew data has been written into the queue 2600 of the device 220, device220 may optionally further determine at block 2706 whether the data isof sufficient length to constitute a complete data message. For example,in one embodiment, the device 220 may make the determination illustratedat block 2706 based on either or both of the values of read pointer 2606and write pointer 2604. Thus, in some embodiments, AS 218 is configuredto write into queue 2600 a complete entry 2602 at a time, and the targetdevice 220 is configured to read from queue 2600 a complete entry 2602at a time. In other embodiments, AS 218 may instead be configured towrite into queue 2600 only a partial entry 2602 at a time, while thetarget device 220 is configured to read from queue 2600 an entire entry2602 at once. In response to a negative determination at block 2706, theprocess returns to block 2702, which has been described. In response toan affirmative determination at block 2706, the device 220 removes thedata message from its queue 2600 using the target real address indicatedby read pointer 2606 (block 2708) and advances read pointer 2606 (block2710). The device 220 may then perform any of a variety of processingon, utilizing and/or in response to the data message. Thereafter, theprocess of FIG. 27 returns to block 2702, which has been described.

In some embodiments, data processing system 100 implements a weak memorymodel, meaning that instructions may be re-ordered for execution in anyorder as long as data dependencies are observed and the instructions arenot explicitly restricted from being executed out-of-order with respectto the program sequence. One technique for restricting execution ofcertain instructions out-of-order is to include in the program sequencea barrier instruction (also referred to as a synchronization or “sync”instruction) to prevent the performance of memory accesses specified bycertain memory access instructions following the barrier instructionuntil memory accesses specified by certain memory access instructionsprior to the barrier instructions are performed. In general, there arefour types of ordering that can be enforced by barrier instructions: (1)store-to-store ordering in which a store-type access to memory before abarrier is ordered relative to a store-type access following thebarrier, (2) store-to-load ordering in which a store-type access beforea barrier is ordered relative to a load-type access following thebarrier, (3) load-to-load ordering in which a load-type access beforethe barrier is ordered relative to a load-type access following thebarrier; and (4) load-to-store ordering in which a load-type accessbefore a barrier is ordered relative to a store-type access followingthe barrier.

The POWER ISA developed by International Business Machines Corporationof Armonk, NY includes two barrier instructions, including a heavyweightsync (HWSYNC) instruction that enforces all four of the orderings notedabove, and a lightweight sync (LWSYNC), which enforces all of theorderings noted above except for store-to-load ordering. These barrierinstructions, when executed, cause corresponding barrier requests to beissued to the L2 STQ 304 of the associated L2 cache 230, which enforcesthe indicated ordering of memory access requests (i.e., copy-typerequests, paste-type requests and store requests) within L2 STQ 304. Insome implementations, it is possible for L2 STQ 304 to enforce orderingon each copy-type and paste-type request within L2 STQ 304 as if it werea conventional store-type request. However, in a preferred embodiment,L2 STQ 304 enforces ordering relative to barrier requests on copy_firstand paste_last requests that initiate and terminate memory moveinstruction sequences, but does not enforce any ordering relative thebarrier requests on copy requests and paste requests within memory moveinstruction sequences. Although copy requests and paste requests are notordered with respect to barriers requests in this embodiment, copy-typeand paste-type requests are naturally ordered relative to one another byL2 STQ 304 in this embodiment, meaning that in such embodiments theserequests are delivered in program sequence to CPD 300 and RC/CO machines310, 312 or cp_RC/cp_CO machines 1100, 1102. As will be appreciated,this ordering behavior simplifies the appropriate (i.e.,programmer-intended) pairing of copy and paste operations. As anadditional consequence of this ordering behavior, paste_last requeststerminating a memory move sequence are not dispatched from L2 STQ 304until all preceding requests within the same memory move sequence havebeen dispatched from L2 STQ 304.

Referring now to FIG. 28, there is depicted a high level logicalflowchart of an exemplary method by which a barrier instruction, such asa heavyweight sync (HWSYNC), is processed in a processor core 200 inaccordance with one embodiment. The process of FIG. 28 begins at block2800 and then proceeds to block 2802, which illustrates a determinationby an execution unit 206 of a processor core 200 (e.g., hereafterassumed to be an LSU 206 a) whether or not an HWSYNC instruction hasbeen received for processing. If not, other processing is performed, asillustrated at block 2804, and the process returns to block 2802. If,however, a determination is made at block 2802 that an HWSYNCinstruction has been received, the process proceeds to block 2806, whichdepicts ISU 202 stalling the dispatch of younger instructions toexecution units 206 for non-speculative execution, for example, inresponse to a signal generated by LSU 206 a in response to receipt ofthe HWSYNC instruction. The process then proceeds in parallel from block2806 to a first path including blocks 2808-2012 and to a second pathincluding block 2814.

In the first path, block 2808 illustrates LSU 206 a issuing an HWSYNCrequest corresponding to the HWSYNC instruction to L2 STQ 304.Completion of the enforcement of store-to-store and store-to-loadordering by L2 STQ 304 with reference to the HWSYNC request is indicatedby receipt of an ACK response from L2 STQ 304 (block 2812). In thesecond path, block 2814 depicts ISU 202 monitoring to determine whetheror not all data requested by load-type instructions preceding the HWSYNCinstruction in program order is “home,” for example, received withinregister files 208. The test shown at block 2814 ensures enforcement ofthe load-to-load and load-to-store ordering mandated by the HWYSNCinstruction.

The process does not proceed to block 2820 until affirmativedeterminations are made at both of blocks 2812 and 2814. As indicated atblock 2810, following block 2808 and until affirmative determinationsare made at both of blocks 2812 and 2814, LSU 206 a may optionallynevertheless speculatively execute copy-type and paste-type instructionsthat follow the HWSYNC instruction in program order, as described ingreater detail below with reference to FIGS. 32-36. Once affirmativedeterminations are made at both of blocks 2812 and 2814, speculativeexecution of copy-type and paste-type instructions at block 2810, ifany, ceases, and the process passes to block 2820, which illustrates ISU202 resuming dispatch to execution units 206 of instructions followingthe HWSYNC instruction in program order. Thereafter, the process of FIG.28 returns to block 2802, which has been described.

With reference now to FIG. 29, there is illustrated a high level logicalflowchart of an exemplary method by which a barrier request, such as aheavyweight sync (HWSYNC) request, is processed in a store queue (e.g.,L2 STQ 304) of a lower level cache memory in accordance with oneembodiment. The process of FIG. 29 begins at block 2900 and thenproceeds to block 2902, which illustrates L2 STQ 304 determining if arequest received within L2 STQ 304 from its associated processor core200 is an HWSYNC request. If not, other processing is performed, asshown at block 2904, and the process returns to block 2902. If, however,L2 STQ 304 determines at block 2902 that the received request is anHWSYNC request, L2 STQ 304 pushes all store-type requests and allpaste_last requests preceding the HWSYNC request to CPD 300 for dispatchto RC/CO machines 310, 312 or cp_RC and cp_CO machines 1100, 1102 (block2906). It should be noted that because all non-speculative instructionsfollowing the HWSYNC instruction are stalled at block 2806 of FIG. 28,no younger non-speculative requests are loaded into L2 STQ 304 while theHWSYNC request is enqueued within L2 STQ 304.

The process of FIG. 29 proceeds from block 2906 to blocks 2908-2910,which respectively illustrate L2 STQ 304 determining whether all olderrequests within L2 STQ 304 have been dispatched for servicing to RC andCO machines 310, 312 or cp_RC and cp_CO machines 1100, 1102 and whetherthe servicing of such older requests has completed. Once affirmativedeterminations are made at both of blocks 2908 and 2910, which signifythat any other cached copies of the target cache lines have beeninvalidated and the target cache lines have been moved to theirdestinations, L2 STQ 304 sends an ACK response to processor core 200 toenable release of the dispatch stall (block 2912). L2 STQ 304 thereafterremoves the HWSYNC request from L2 STQ 304 (block 2914). Following block2914, the process of FIG. 29 returns to block 2902.

Referring now to FIG. 30, there is a high level logical flowchart of anexemplary method by which a barrier instruction, such as a lightweightsync (LWSYNC), is processed in a processor core in accordance with oneembodiment. The process of FIG. 30 begins at block 3000 and thenproceeds to block 3002, which illustrates a determination by anexecution unit 206 of a processor core 200 (e.g., hereafter assumed tobe an LSU 206 a) whether or not an LWSYNC instruction has been receivedfor processing. If not, other processing is performed, as illustrated atblock 3004, and the process returns to block 3002. If, however, adetermination is made at block 3002 that an LWSYNC instruction has beenreceived, the process proceeds to block 3006, which depicts ISU 202stalling the dispatch of younger instructions to execution units 206 fornon-speculative execution, for example, in response to a signalgenerated by LSU 206 a in response to receipt of the LWSYNC instruction.The process then proceeds in parallel from block 3006 to a first pathincluding block 3008 and to a second path including blocks 3014-3016.

In the first path, block 3008 illustrates LSU 206 a issuing an LWSYNCrequest corresponding to the LWSYNC instruction to L2 STQ 304. Stallingdispatch of younger instructions to execution units 206 at block 3006until the LWSYNC request is issued to L2 STQ 304 at block 3008 ensuresobservance of the store-to-store ordering mandated by the LWSYNCinstruction. In the second path, block 3014 depicts ISU 202 monitoringto determine whether or not all data requested by load-type instructionspreceding the LWSYNC instruction in program order is “home,” forexample, received within register files 208. Once the data requested byolder load-type instructions is home, ISU 202 can resume dispatch ofyounger loads that follow the LWSYNC instruction in program order (block3016). The sequence of blocks 3014-2016 ensures enforcement of theload-to-load and load-to-store ordering mandated by the LWYSNCinstruction.

The process does not proceed to block 3012 until the LWSYNC request isissued at block 3008 and an affirmative determination is made at block3014. Once the LWSYNC request is issued at block 3008 and an affirmativedetermination is made at block 3014, the process passes to block 3012,which illustrates ISU 202 resuming dispatch to execution units 206 ofstore-type, copy-type and paste-type instructions following the LWSYNCinstruction in program order. As indicated at block 3010, followingblock 3008 and until the processing at block 3012 is complete, LSU 206 amay optionally speculatively execute copy-type and paste-typeinstructions that follow the HWSYNC instruction in program order, asdescribed in greater detail below with reference to FIGS. 32-36.Following block 3012, the process of FIG. 30 returns to block 3002,which has been described.

With reference now to FIG. 31, there is illustrated a high level logicalflowchart of an exemplary method by which a barrier request, such as alightweight sync (LWSYNC), is processed in a store queue (e.g., L2 STQ304) of a lower level cache memory in accordance with one embodiment.The process of FIG. 31 begins at block 3100 and then proceeds to block3102, which illustrates L2 STQ 304 determining if a request receivedwithin L2 STQ 304 from its associated processor core 200 is an LWSYNCrequest. If not, other processing is performed, as shown at block 3104,and the process returns to block 3102. If, however, L2 STQ 304determines at block 3102 that the received request is an LWSYNC request,L2 STQ 304 enforces the barrier indicated by the LWSYNC request byordering all store-type requests and all paste_last requests precedingthe LWSYNC request ahead of any younger store-type, copy-type andpaste-type requests following the LWSYNC request in terms of theirissuance to CPD 300 for dispatch to RC/CO machines 310, 312 or cp_RC andcp_CO machines 1100, 1102 (block 3106).

The process of FIG. 31 proceeds from block 3106 to blocks 3108-3110,which respectively illustrate L2 STQ 304 determining whether all olderrequests within L2 STQ 304 ordered by block 3106 have been dispatchedfor servicing to RC and CO machines 310, 312 or cp_RC and cp_CO machines1100, 1102 and whether the servicing of such older requests has beencompleted. Once affirmative determinations are made at both of blocks3108 and 3110, which signify that any other cached copies of the targetcaches lines of such older requests have been invalidated and the targetcache lines have been moved to their destinations, L2 STQ 304 removesthe LWSYNC request from L2 STQ 304 (block 3112). Following block 3112,the process of FIG. 31 returns to block 3102. It should be noted thatunlike FIG. 29, FIG. 31 does not provide an ACK response to theprocessor core 200 because LWSYNC instructions do not enforce anystore-to-load ordering.

Referring now to FIG. 32, there is depicted a block diagram of anexemplary design flow 3200 used for example, in semiconductor IC logicdesign, simulation, test, layout, and manufacture. Design flow 3200includes processes, machines and/or mechanisms for processing designstructures or devices to generate logically or otherwise functionallyequivalent representations of the design structures and/or devicesdescribed above and shown, for example, in FIGS. 1-3. The designstructures processed and/or generated by design flow 3200 may be encodedon machine-readable transmission or storage media to include data and/orinstructions that when executed or otherwise processed on a dataprocessing system generate a logically, structurally, mechanically, orotherwise functionally equivalent representation of hardware components,circuits, devices, or systems. Machines include, but are not limited to,any machine used in an IC design process, such as designing,manufacturing, or simulating a circuit, component, device, or system.For example, machines may include: lithography machines, machines and/orequipment for generating masks (e.g. e-beam writers), computers orequipment for simulating design structures, any apparatus used in themanufacturing or test process, or any machines for programmingfunctionally equivalent representations of the design structures intoany medium (e.g. a machine for programming a programmable gate array).

Design flow 3200 may vary depending on the type of representation beingdesigned. For example, a design flow 3200 for building an applicationspecific IC (ASIC) may differ from a design flow 3200 for designing astandard component or from a design flow 3200 for instantiating thedesign into a programmable array, for example a programmable gate array(PGA) or a field programmable gate array (FPGA) offered by Altera® Inc.or Xilinx® Inc.

FIG. 32 illustrates multiple such design structures including an inputdesign structure 3220 that is preferably processed by a design process3210. Design structure 3220 may be a logical simulation design structuregenerated and processed by design process 3210 to produce a logicallyequivalent functional representation of a hardware device. Designstructure 3220 may also or alternatively comprise data and/or programinstructions that when processed by design process 3210, generate afunctional representation of the physical structure of a hardwaredevice. Whether representing functional and/or structural designfeatures, design structure 3220 may be generated using electroniccomputer-aided design (ECAD) such as implemented by a coredeveloper/designer. When encoded on a machine-readable datatransmission, gate array, or storage medium, design structure 3220 maybe accessed and processed by one or more hardware and/or softwaremodules within design process 3210 to simulate or otherwise functionallyrepresent an electronic component, circuit, electronic or logic module,apparatus, device, or system such as those shown, for example, in FIGS.1-3. As such, design structure 3220 may comprise files or other datastructures including human and/or machine-readable source code, compiledstructures, and computer-executable code structures that when processedby a design or simulation data processing system, functionally simulateor otherwise represent circuits or other levels of hardware logicdesign. Such data structures may include hardware-description language(HDL) design entities or other data structures conforming to and/orcompatible with lower-level HDL design languages such as Verilog andVHDL, and/or higher level design languages such as C or C++.

Design process 3210 preferably employs and incorporates hardware and/orsoftware modules for synthesizing, translating, or otherwise processinga design/simulation functional equivalent of the components, circuits,devices, or logic structures shown above, for example, in FIGS. 1-3 togenerate a netlist 3280 which may contain design structures such asdesign structure 3220. Netlist 3280 may comprise, for example, compiledor otherwise processed data structures representing a list of wires,discrete components, logic gates, control circuits, I/O devices, models,etc. that describes the connections to other elements and circuits in anintegrated circuit design. Netlist 3280 may be synthesized using aniterative process in which netlist 3280 is resynthesized one or moretimes depending on design specifications and parameters for the device.As with other design structure types described herein, netlist 3280 maybe recorded on a machine-readable storage medium or programmed into aprogrammable gate array. The medium may be a non-volatile storage mediumsuch as a magnetic or optical disk drive, a programmable gate array, acompact flash, or other flash memory. Additionally, or in thealternative, the medium may be a system or cache memory, or bufferspace.

Design process 3210 may include hardware and software modules forprocessing a variety of input data structure types including netlist3280. Such data structure types may reside, for example, within libraryelements 3230 and include a set of commonly used elements, circuits, anddevices, including models, layouts, and symbolic representations, for agiven manufacturing technology (e.g., different technology nodes, 32 nm,45 nm, 90 nm, etc.). The data structure types may further include designspecifications 3240, characterization data 3250, verification data 3260,design rules 3270, and test data files 3285 which may include input testpatterns, output test results, and other testing information. Designprocess 3210 may further include, for example, standard mechanicaldesign processes such as stress analysis, thermal analysis, mechanicalevent simulation, process simulation for operations such as casting,molding, and die press forming, etc. One of ordinary skill in the art ofmechanical design can appreciate the extent of possible mechanicaldesign tools and applications used in design process 3210 withoutdeviating from the scope and spirit of the invention. Design process3210 may also include modules for performing standard circuit designprocesses such as timing analysis, verification, design rule checking,place and route operations, etc.

Design process 3210 employs and incorporates logic and physical designtools such as HDL compilers and simulation model build tools to processdesign structure 3220 together with some or all of the depictedsupporting data structures along with any additional mechanical designor data (if applicable), to generate a second design structure 3290.Design structure 3290 resides on a storage medium or programmable gatearray in a data format used for the exchange of data of mechanicaldevices and structures (e.g., information stored in a IGES, DXF,Parasolid XT, JT, DRG, or any other suitable format for storing orrendering such mechanical design structures). Similar to designstructure 3220, design structure 3290 preferably comprises one or morefiles, data structures, or other computer-encoded data or instructionsthat reside on transmission or data storage media and that whenprocessed by an ECAD system generate a logically or otherwisefunctionally equivalent form of one or more of the embodiments of theinvention shown in FIGS. 1-3. In one embodiment, design structure 3290may comprise a compiled, executable HDL simulation model thatfunctionally simulates the devices shown in FIGS. 1-3.

Design structure 3290 may also employ a data format used for theexchange of layout data of integrated circuits and/or symbolic dataformat (e.g., information stored in a GDSII (GDS2), GL1, OASIS, mapfiles, or any other suitable format for storing such design datastructures). Design structure 3290 may comprise information such as, forexample, symbolic data, map files, test data files, design contentfiles, manufacturing data, layout parameters, wires, levels of metal,vias, shapes, data for routing through the manufacturing line, and anyother data required by a manufacturer or other designer/developer toproduce a device or structure as described above and shown in FIGS. 1-3.Design structure 3290 may then proceed to a stage 3295 where, forexample, design structure 3290: proceeds to tape-out, is released tomanufacturing, is released to a mask house, is sent to another designhouse, is sent back to the customer, etc.

As has been described, in at least one embodiment, a processor core hasa store-through upper level cache and a store-in lower level cache. Inresponse to execution of a memory move instruction sequence including aplurality of copy-type instruction and a plurality of paste-typeinstructions, the processor core transmits a corresponding plurality ofcopy-type and paste-type requests to the lower level cache, where eachcopy-type request specifies a source real address and each paste-typerequest specifies a destination real address. In response to receipt ofeach copy-type request, the lower level cache copies a respective one ofa plurality of data granules from a respective storage locationspecified by the source real address of that copy-type request into anon-architected buffer. In response to receipt of each paste-typerequest, the lower level cache writes a respective one of the pluralityof data granules from the non-architected buffer to a respective storagelocation specified by the destination real address of that paste-typerequest.

While various embodiments have been particularly shown and described, itwill be understood by those skilled in the art that various changes inform and detail may be made therein without departing from the spiritand scope of the appended claims and these alternate implementations allfall within the scope of the appended claims. For example, althoughaspects have been described with respect to a computer system executingprogram code that directs the functions of the present invention, itshould be understood that present invention may alternatively beimplemented as a program product including a computer-readable storagedevice storing program code that can be processed by a processor of adata processing system to cause the data processing system to performthe described functions. The computer-readable storage device caninclude volatile or non-volatile memory, an optical or magnetic disk, orthe like, but excludes non-statutory subject matter, such as propagatingsignals per se, transmission media per se, and forms of energy per se.

As an example, the program product may include data and/or instructionsthat when executed or otherwise processed on a data processing systemgenerate a logically, structurally, or otherwise functionally equivalentrepresentation (including a simulation model) of hardware components,circuits, devices, or systems disclosed herein. Such data and/orinstructions may include hardware-description language (HDL) designentities or other data structures conforming to and/or compatible withlower-level HDL design languages such as Verilog and VHDL, and/or higherlevel design languages such as C or C++. Furthermore, the data and/orinstructions may also employ a data format used for the exchange oflayout data of integrated circuits and/or symbolic data format (e.g.information stored in a GDSII (GDS2), GL1, OASIS, map files, or anyother suitable format for storing such design data structures).

What is claimed is:
 1. A method of data processing in a data processingsystem including a processor core having a store-through upper levelcache and a store-in lower level cache, the method comprising: inresponse to execution by the processor core of a memory move instructionsequence including a plurality of copy-type instructions and a pluralityof paste-type instructions, the processor core transmitting acorresponding plurality of copy-type and paste-type requests to thelower level cache, wherein each copy-type request specifies a sourcereal address and each paste-type request specifies a destination realaddress; in response to receipt of each copy-type request, the lowerlevel cache copying a respective one of a plurality of data granulesfrom a respective storage location specified by the source real addressof that copy-type request into a non-architected buffer; and in responseto receipt of each paste-type request, the lower level cache writing arespective one of the plurality of data granules from thenon-architected buffer to a respective storage location specified by thedestination real address of that paste-type request.
 2. The method ofclaim 1, wherein the copying includes copying the plurality of datagranules into a non-architected data buffer in the lower level cachethat contains multiple entries.
 3. The method of claim 1, and furthercomprising: the processor core determining each source real address andeach destination real address by translating effective addressesdetermined by executing the plurality of copy-type requests and theplurality of paste-type instructions.
 4. The method of claim 1, wherein:each of the plurality of copy-type request has a paired paste-typerequest; and the copying includes the lower level cache copying arespective data granule only in response to receipt of both thecopy-type request and its paired paste-type request.
 5. The method ofclaim 4, wherein: the lower level cache concurrently allocating a pairof state machines to service each pair of a copy-type request and apaste-type request.
 6. The method of claim 1, and further comprisingaborting a remainder of the memory move instruction sequence on acurrent hardware thread of the processor core in response to thehardware thread executing an explicit copy-paste abort instruction. 7.The method of claim 1, and further comprising the processor coretracking success or failure of the memory move instruction sequenceutilizing one or more state flags in the processor core.
 8. A processingunit, comprising: a processor core having a store-through upper levelcache and a store-in lower level cache, wherein the processor core isconfigured to: in response to execution of a memory move instructionsequence including a plurality of copy-type instructions and a pluralityof paste-type instructions, transmit a corresponding plurality ofcopy-type and paste-type requests to the lower level cache, wherein eachcopy-type request specifies a source real address and each paste-typerequest specifies a destination real address; wherein the lower levelcache is configured to: in response to receipt of each copy-typerequest, copy a respective one of a plurality of data granules from arespective storage location specified by the source real address of thatcopy-type request into a non-architected buffer; and in response toreceipt of each paste-type request, write a respective one of theplurality of data granules from the non-architected buffer to arespective storage location specified by the destination real address ofthat paste-type request.
 9. The processing unit of claim 8, wherein thenon-architected data buffer is included in the lower level cache andcontains multiple entries.
 10. The processing unit of claim 8, wherein:the processor core further comprises an address translation facility;and the processor core, utilizing the address translation facility,determines each source real address and each destination real address bytranslating effective addresses determined by executing the plurality ofcopy-type requests and the plurality of paste-type instructions.
 11. Theprocessing unit of claim 8, wherein: each of the plurality of copy-typerequest has a paired paste-type request; and the lower level cachecopies a respective data granule only in response to receipt of both thecopy-type request and its paired paste-type request.
 12. The processingunit of claim 11, wherein the lower level cache is configured toconcurrently allocate a pair of state machines to service each pair of acopy-type request and a paste-type request.
 13. The processing unit ofclaim 8, wherein the processor core is configured to abort a remainderof the memory move instruction sequence on a current hardware thread ofthe processor core in response to the hardware thread executing anexplicit copy-paste abort instruction.
 14. The processing unit of claim8, wherein the processor core tracks success or failure of the memorymove instruction sequence utilizing one or more state flags in theprocessor core.
 15. A data processing system, comprising: the processingunit of claim 8; a memory controller having a system memory coupledthereto; a memory-mapped device having a storage location that isassigned the destination real address; and an interconnect fabriccommunicatively coupling the processing unit, memory controller andmemory-mapped device.
 16. A design structure tangibly embodied in acomputer-readable storage device for designing, manufacturing, ortesting an integrated circuit, the design structure comprising: aprocessing unit, comprising: a processor core having a store-throughupper level cache and a store-in lower level cache, wherein theprocessor core is configured to: in response to execution of a memorymove instruction sequence including a plurality of copy-typeinstructions and a plurality of paste-type instructions, transmit acorresponding plurality of copy-type and paste-type requests to thelower level cache, wherein each copy-type request specifies a sourcereal address and each paste-type request specifies a destination realaddress; wherein the lower level cache is configured to: in response toreceipt of each copy-type request, copy a respective one of a pluralityof data granules from a respective storage location specified by thesource real address of that copy-type request into a non-architectedbuffer; and in response to receipt of each paste-type request, write arespective one of the plurality of data granules from thenon-architected buffer to a respective storage location specified by thedestination real address of that paste-type request.
 17. The designstructure of claim 16, wherein the non-architected data buffer isincluded in the lower level cache and contains multiple entries.
 18. Thedesign structure of claim 16, wherein: the processor core furthercomprises an address translation facility; and the processor core,utilizing the address translation facility, determines each source realaddress and each destination real address by translating effectiveaddresses determined by executing the plurality of copy-type requestsand the plurality of paste-type instructions.
 19. The design structureof claim 16, wherein: each of the plurality of copy-type request has apaired paste-type request; and the lower level cache copies a respectivedata granule only in response to receipt of both the copy-type requestand its paired paste-type request.